Click here to Skip to main content
15,912,021 members
Home / Discussions / C#
   

C#

 
QuestionPassing Override Method into Deligates Pin
satsumatable5-Jan-09 17:38
satsumatable5-Jan-09 17:38 
AnswerRe: Passing Override Method into Deligates Pin
Christian Graus5-Jan-09 18:15
protectorChristian Graus5-Jan-09 18:15 
AnswerRe: Passing Override Method into Deligates Pin
N a v a n e e t h5-Jan-09 19:49
N a v a n e e t h5-Jan-09 19:49 
AnswerRe: Passing Override Method into Deligates Pin
Dragonfly_Lee5-Jan-09 21:20
Dragonfly_Lee5-Jan-09 21:20 
QuestionExcel chart to image Pin
mjmbball5-Jan-09 16:35
mjmbball5-Jan-09 16:35 
AnswerRe: Excel chart to image Pin
dan!sh 5-Jan-09 17:52
professional dan!sh 5-Jan-09 17:52 
QuestionHow do I get user's local time . I am using asp.net ,C# Pin
mdpavel5-Jan-09 16:30
mdpavel5-Jan-09 16:30 
AnswerRe: How do I get user's local time . I am using asp.net ,C# Pin
Guffa5-Jan-09 16:46
Guffa5-Jan-09 16:46 
Yes, you need to use Javascript. Create a Date object to get the current time, use the getTime method to get the date as an integer value, and put the value in a hidden field. Read the value when it's posted to the server and convert it to a DateTime value.

Hidden field:
<input type="hidden" id="ClientTime" name="ClientTime" />

Javascript code:
document.getElementById('ClientTime').value = new Date().getTime();

Server code:
string milliseconds = Request.Form["ClientTime"];
DateTime clientTime;
if (string.IsNullOrEmpty(milliseconds)) {
   clientTime = DateTime.Now;
} else {
   clientTime = new DateTime(1970,1,1).AddMilliseconds((double)long.Parse(milliseconds));
}


Despite everything, the person most likely to be fooling you next is yourself.

AnswerRe: How do I get user's local time . I am using asp.net ,C# Pin
mdpavel5-Jan-09 17:13
mdpavel5-Jan-09 17:13 
GeneralRe: How do I get user's local time . I am using asp.net ,C# Pin
Guffa5-Jan-09 17:53
Guffa5-Jan-09 17:53 
GeneralRe: How do I get user's local time . I am using asp.net ,C# Pin
mdpavel5-Jan-09 18:00
mdpavel5-Jan-09 18:00 
GeneralRe: How do I get user's local time . I am using asp.net ,C# Pin
Christian Graus5-Jan-09 18:17
protectorChristian Graus5-Jan-09 18:17 
GeneralRe: How do I get user's local time . I am using asp.net ,C# Pin
mdpavel5-Jan-09 18:41
mdpavel5-Jan-09 18:41 
GeneralRe: How do I get user's local time . I am using asp.net ,C# Pin
Dave Kreskowiak5-Jan-09 18:49
mveDave Kreskowiak5-Jan-09 18:49 
GeneralRe: How do I get user's local time . I am using asp.net ,C# Pin
dan!sh 5-Jan-09 19:21
professional dan!sh 5-Jan-09 19:21 
GeneralRe: How do I get user's local time . I am using asp.net ,C# Pin
Tom Deketelaere5-Jan-09 22:57
professionalTom Deketelaere5-Jan-09 22:57 
GeneralRe: How do I get user's local time . I am using asp.net ,C# Pin
Guffa5-Jan-09 20:06
Guffa5-Jan-09 20:06 
Questiondll and app config - need to cut/paste everytime...? [modified] Pin
devvvy5-Jan-09 15:53
devvvy5-Jan-09 15:53 
AnswerRe: Simple question on dll and app config Pin
Mycroft Holmes5-Jan-09 16:11
professionalMycroft Holmes5-Jan-09 16:11 
GeneralRe: Simple question on dll and app config Pin
devvvy5-Jan-09 16:18
devvvy5-Jan-09 16:18 
QuestionI Need a math formula for this issue. Pin
Silvyster5-Jan-09 15:01
Silvyster5-Jan-09 15:01 
GeneralRe: I Need a math formula for this issue. Pin
Luc Pattyn5-Jan-09 15:21
sitebuilderLuc Pattyn5-Jan-09 15:21 
GeneralRe: I Need a math formula for this issue. Pin
_Maxxx_5-Jan-09 17:40
professional_Maxxx_5-Jan-09 17:40 
GeneralRe: I Need a math formula for this issue. Pin
Dewald5-Jan-09 20:38
Dewald5-Jan-09 20:38 
QuestionRead special caractors in XML Pin
Dushan1235-Jan-09 13:48
Dushan1235-Jan-09 13:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.