Click here to Skip to main content
15,901,001 members
Home / Discussions / C#
   

C#

 
Questionhowto parse this text using c# ? Pin
cmpeng3412-Jun-06 4:24
cmpeng3412-Jun-06 4:24 
AnswerRe: howto parse this text using c# ? Pin
Dustin Metzgar12-Jun-06 4:27
Dustin Metzgar12-Jun-06 4:27 
AnswerRe: howto parse this text using c# ? Pin
Ravi Bhavnani12-Jun-06 4:53
professionalRavi Bhavnani12-Jun-06 4:53 
QuestionC# DLL from C++ DLL Pin
Andrei Ungureanu12-Jun-06 4:05
Andrei Ungureanu12-Jun-06 4:05 
AnswerRe: C# DLL from C++ DLL Pin
Ista12-Jun-06 10:20
Ista12-Jun-06 10:20 
QuestionTimer Control In C# Pin
peshawarcoder12-Jun-06 3:59
peshawarcoder12-Jun-06 3:59 
AnswerRe: Timer Control In C# Pin
Andrei Ungureanu12-Jun-06 4:11
Andrei Ungureanu12-Jun-06 4:11 
AnswerRe: Timer Control In C# Pin
3Dizard12-Jun-06 7:48
3Dizard12-Jun-06 7:48 
You could use the following:
Use System.Timers.Timer class for your timer and add a static instance of the class to your webform. (Static because you want it to run on the server on not getting initilized when a user requests something on the client). To help you a bit on that here's my code which worked for me:
<br />
//create own timerclass<br />
public class TimerClass<br />
{<br />
 System.Timers.Timer timer = new System.Timers.Timer();<br />
 public TimerClass(double interval, bool enabled, params System.Timers.ElapsedEventHandler[] fto)<br />
 {<br />
  timer.Interval = interval;<br />
  timer.Enabled = enabled;<br />
  for (int i = 0; i < fto.Length; i++)<br />
  {<br />
   timer.Elapsed += fto[i];<br />
  }<br />
  timer.Start();<br />
 }<br />
}<br />
<br />
//now to the webform<br />
public class WebForm1 : System.Web.UI.Page<br />
{<br />
protected static TimerClass MyTimer = new TimerClass(1000, true, new System.Timers.ElapsedEventHandler(MyTimer_Elapsed)); //MyTimer_Elapsed is the method to be called<br />
}<br />


Hope this helps.
Greetings
Questionhow to attach more than 10mb file Pin
ayyp12-Jun-06 3:48
ayyp12-Jun-06 3:48 
Questionupload 15mb file Pin
ayyp12-Jun-06 3:46
ayyp12-Jun-06 3:46 
Questionswitching between forms Pin
PaulaM12-Jun-06 3:23
PaulaM12-Jun-06 3:23 
AnswerRe: switching between forms Pin
MCSD-Gandalf12-Jun-06 3:33
MCSD-Gandalf12-Jun-06 3:33 
GeneralRe: switching between forms Pin
PaulaM12-Jun-06 4:45
PaulaM12-Jun-06 4:45 
AnswerRe: switching between forms Pin
Andrei Ungureanu12-Jun-06 4:09
Andrei Ungureanu12-Jun-06 4:09 
GeneralRe: switching between forms Pin
PaulaM12-Jun-06 4:44
PaulaM12-Jun-06 4:44 
AnswerRe: switching between forms Pin
Jun Du12-Jun-06 4:26
Jun Du12-Jun-06 4:26 
QuestionAntiAliased Form Pin
Sabry190512-Jun-06 3:21
Sabry190512-Jun-06 3:21 
AnswerRe: AntiAliased Form Pin
Roger Alsing12-Jun-06 3:45
Roger Alsing12-Jun-06 3:45 
GeneralRe: AntiAliased Form Pin
Sabry190515-Jun-06 3:39
Sabry190515-Jun-06 3:39 
QuestionSecurity in Web Services Pin
malikjhangirahmed@hotmail.com12-Jun-06 3:13
malikjhangirahmed@hotmail.com12-Jun-06 3:13 
AnswerRe: Security in Web Services Pin
Dustin Metzgar12-Jun-06 3:55
Dustin Metzgar12-Jun-06 3:55 
Questiondatagrid template column Pin
eefron12-Jun-06 2:57
eefron12-Jun-06 2:57 
AnswerRe: datagrid template column Pin
Mr. VB.NET12-Jun-06 18:23
Mr. VB.NET12-Jun-06 18:23 
Questionchanging a column type of datagridview ? Pin
cmpeng3412-Jun-06 2:56
cmpeng3412-Jun-06 2:56 
AnswerRe: changing a column type of datagridview ? Pin
MCSD-Gandalf12-Jun-06 7:14
MCSD-Gandalf12-Jun-06 7:14 

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.