C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Time alone in ASP.Net


Posted Date: 07 Oct 2008      Total Responses: 3

Posted By: Angel Sherin       Member Level: Silver     Points: 1


Hi friends i am working in C# with asp.Net applications.In my project i have a test box, i need to add an option so that when i click the textbox time will be displayed like calender(No idea how) and after selecting the time , the selected tiame must be displayed in Militiary Format (10:44:09) in the TextBox where i clicked First...Any known friends plz help me out...Thanks in advance...



Responses

Author: Meetu Choudhary    07 Oct 2008Member Level: GoldRating:     Points: 2
its very simple in ajax calender control there you have to set some properties only

try that

http://www.asp.net/AJAX/AjaxControlToolkit/Samples/Calendar/Calendar.aspx

--
Thanks and Regards
Meetu Choudhary



Author: amal    07 Oct 2008Member Level: BronzeRating:     Points: 3
function getTime()
{
var Dat=new Date();
var Min=Dat.getMinutes()
var Sec=Dat.getSeconds()
var Hr=Dat.getHours()
var AMPM;
if(Hr<10)
{
Hr="0"+Hr
}
if(Sec<10)
{
Sec="0"+Sec
}
if(Min<10)
{
Min="0"+Min
}

if(parseInt(Hr)>=12)
{
AMPM="PM"
if(Hr!=12)
{
Hr=parseInt(parseInt(Hr)-12)
}
}
else
{
AMPM="AM"
}
var det=Hr + ':'+ Min +':' + Sec+" " +AMPM
document.getElementById("TxtTime").value=det

}



try this javascript



Author: amal    07 Oct 2008Member Level: BronzeRating:     Points: 3


setTimeout("SetDt();",987)

add this also after document.getElementById("TxtTime").value=det



Post Reply
You must Sign In to post a response.
Next : diff b/w gridview, datalist, repeater ?
Previous : Stored Procedure
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

efax

Contact Us    Privacy Policy    Terms Of Use