I downloaded a web timer control from
http://www.eggheadcafe.com/articles/20021006.asp and it's written in C#. The
code and .DLL comes with the download so I'm trying to convert the sample
which was written in C# to VB (ASP.NET). Here is the following code in the
Default.aspx page...
private void PgTimer1_Elapse d(object sender, System.EventArg s e)
{
if (Application["PgTimer"] == null)
{
Application["PgTimer"] = 0;
}
string strResult = "Elapsed Event: " + DateTime.Now.Mi llisecond;
Application["PgTimer"] = (int)Applicatio n["PgTimer"] + 1;
Response.Write( "Instance: " + Application["PgTimer"].ToString() + ": " +
strResult);
}
Can anyone help me convert this to its VB.NET equivalent?
Here is what I have so far...
Private Sub PgTimer1_Elapse d(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles PgTimer1.Elapse d
Dim strResult As String
Dim intNum As Integer
strResult = "Elapsed Event: " & DateTime.Now.Mi llisecond
' The following line is just a placeholder only until I figure out
' how to convert the following C# code.
'
' Application["PgTimer"] = (int)Applicatio n["PgTimer"] + 1;
intNum += 1
Response.Write( "Instance: " & intNum.ToString () & ": " + strResult)
End Sub