Monday, August 15, 2011

Shadow

How to create a shadow around the border of rectangle with width 964px. It's quite simple and quick.
1. Insert div-tag into HTML-page.
<div class="shadow"> </div>
Put HTML code inside of the div
2. Insert a couple rows in css.
.shadow {
width: 964px;
margin: 0 auto;
-moz-box-shadow: 0 0 10px 1px #888;
-webkit-box-shadow: 0 0 10px 1px #888;
box-shadow: 0 0 10px 1px #888;
background-color: white;
}
Please view Microsoft documentation on the topic

Friday, August 12, 2011

Tutoring others

Just couple months ago I began exploring world of SharePoint. My goal was to be comfortable with software and build up first portal website for the company I work. I was very new and my knowledge was so limited. I had a feeling I never can build this site. Thanks to a couple books and my determination to learn SharePoint up to the point when I would feel comfortable to satisfy needs of my colleagues, today I finished my first SharePoint portal website and ready to present to my coworkers. I'm really proud of myself. My boss asked to organize a tutoring session for 12 people who will use my site a lot. It's quite privileage and honor to tutor people especially for me who learned new software quickly and effectively. I'm still in learning phase, I'm still thinking I need to improve my skills a lot. It's just a first steps for me. Now I have to prepare myself for tutoring presentation.

Monday, August 8, 2011

YearPicker with JQuery

Here's my first attempt to use JQUERY in my work. I created a year-picker. My script shows up the drop down box with years after 1993 and redirects to appropriate page on change.

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
<script type="text/javascript" src="js/jquery-1.6.2.min.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
<div id="adr1">
<table cellpadding="10" cellspacing="0" border="0">
<tr>
<td><img src="sample.jpg" alt="Sample1" /></td>
<td><h2>Sample2</h2><br /><br />
<select name="yearpicker" id="yearpicker" onchange="location = 'adr_' + this.options[this.selectedIndex].value + '.htm';"></select>
<script type="text/javascript">
for (i = new Date().getFullYear(); i > 1993; i--) { $('#yearpicker').append($('<option />').val(i).html(i)); }
</script>
</td>
</tr>
</table>
</div>
</asp:Content>

Friday, July 22, 2011

ASP.NET Menu and cross-browser compatability.

I'm not a first or last one who spends a lot of time trying to adjust code for all possible browsers. In my previous post I uploaded a code how to general multilevel menu in ASP.NET environment. In this post I would like to take some time to talk about issues with various browsers which render code differently. Therefore, we might have different presentation.

I'm not first or last one who writes how painful for developers to code and recode pieces of software only because different browsers have own standards. As many of you know, in most cases Microsoft code works OK in IE, but have some problems with Firefox or Chrome.
In my case, it did work with IE and Mozilla Firefox, but if did not work for with Chrome and Safari. No matter how I tried to adjust menu for Chrome, it did not work out. I took a simple, but it looks to me, elegant decision.

I found a site and downloaded a sample-code. I worked on this code
and made the menu look exactly like I want and plugged into my code. Therefore, now my code works with most of popular browsers without any problem.

Friday, July 8, 2011

Custom Error Pages in ASP.NET

First of all, thanks Ted for putting out useful article about this issue.

1. Make sure HTTP errors is enabled/installed in IIS (see picture)



2. Add some code in top-level web.config file. (For example, this displays an ASP.NET page when a 404 error occurs, without rewriting the URL (the visitor will still see the requested URL in the address bar))
- inside <system.webServer>-tag add:

<httpErrors>
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="/errors/pagenotfound.aspx" responseMode="ExecuteURL" />
</httpErrors>

- inside <system.web>-tag add:

<customErrors mode="On" defaultRedirect="~/errors/GeneralError.aspx">
<error statusCode="404" redirect="~/errors/PageNotFound.aspx" />
</customErrors>

3. Create 2 error-pages GeneralError.aspx and PageNotFound.aspx-page in errors-folder.
4. For example, go to SRTR and try to type in URL box something like https://securesrtr.transplant.hrsa.gov/you and hit Enter. PageNotFound must show up.

Wednesday, July 6, 2011

Problems, problems, and problems.

Calendar implementation is taking a lot more time that we initially thought. We have to synchronize SharePoint calendar (one domain) with master Outlook calendar (another domain). It's not easy as it sounds. We spent 2 days googling Internet and trying to find a solution. Finally
we found something interesting and closed to our need. It's an Exchange calendar web part written by Swiss software company which specializes in Sharepoint web parts. It's quite interesting piece of software written for SharePoint. It contains several dll-files and one web part file.

We'll see if it's going to work for us... A day later I can say: IT WORKS only with right permissions between domains.

Friday, July 1, 2011

Always something new.

Every day I learn something new and exciting. Today I found a very interesting article and video.

Who invented mathematical constant pi? According to Wikipedia,the Greek letter p was first adopted for the number as an abbreviation of the Greek word for perimeter,
or as an abbreviation for "periphery/diameter", by William Jones in 1706. The constant is also known as Archimedes' Constant, after Archimedes of Syracuse who provided an approximation of the number, although this name for the constant is uncommon in modern English-speaking contexts. Now ancient constant is going through transformation. We shall see who is right...