It is easy enough to convert, but I am not sure that is what you really want.
For example:
'These will be String.Empty if the Request is NULL (Nothing)
Dim secondsToWait As String = Request.QueryString("secondsToWait")
Dim minutesToWait As String = Request.QueryString("minutesToWait")
If (minutesToWait <> String.Empty) Then
secondsToWait="0"
Else
Dim seconds As Int = Int32.Parse(secondsToWait)
Dim minutes As Int = seconds/60
If (seconds Mod 60 = 0) AND (minutes > 1) Then
minutesToWait = minutes.ToString()
secondsToWait = "0"
End If
End If
---
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!
***************************
"Chris" wrote:
Hi,
Can someone convert this to VB.NET Please. I am trying but for some reason
it doesn't work.
if (null != Request.QueryString["secondsToWait"])
{
secondsToWait = Request.QueryString["secondsToWait"];
if ((Int32.Parse(secondsToWait) % 60 == 0)
&& ((Int32.Parse(secondsToWait)) / 60) > 1)
{
int minutes = Int32.Parse(secondsToWait) / 60;
minutesToWait = minutes.ToString();
secondsToWait = "0";
}
}
if (null != Request.QueryString["minutesToWait"])
{
secondsToWait = "0";
minutesToWait = Request.QueryString["minutesToWait"];
}
Thanks