cen someone convert this please

G

Guest

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
 
G

Guest

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!
***************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top