Archive

Archive for the ‘HTML & Javascript’ Category

Getting Client Timezone in ASP .NET

February 22, 2010 Leave a comment
ASP .net Provides dataTime functions like UtcNow, to get the UTC time at present. With DateTime.Now, DateTime.UtcNow, we can calculate Time offset between Server and UTC.
 
But how to find out the offset of client?, the end user who is browsing our site from a different timezone.
For findout the javascript’s Date() object provides a method called "getTimezoneOffset()", which returnes the offset value in Minutes.
 
Refer the blow links from more information.
Categories: HTML & Javascript

Show an Required Symbol on top of HTML control

December 16, 2009 Leave a comment
Showing a required symbol is very common requirement for any application. 
In our applications show a required symbol,to represent the data in a control is mandatory, by using * or ? or ! (it can be any thing).
 
See the below picture…TextBox control has a RED indicator on top-left. Something special representation..! (Is it not..?)
Below is the code for it…
 

<

div style="position: absolute; width: 176px; height: 19px; z-index: 200;">
<div style
="top: 0px;">
<div style
="top: 0px; float: left;">
        <input type="text" id="X27" value="See my top-left" ame="txtName" maxlength="" style
="width: 140px; ">
        <img src="mandatory.gif" alt="Required Field" style
=position: absolute; top: 1px; left: 0px;">
</div></div></div>
 

 
Downlaod the mandatory image from here.
 
Happy HTML…!
Categories: HTML & Javascript