473,405 Members | 2,262 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

cen someone convert this please

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
Nov 18 '05 #1
2 1267
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

Nov 18 '05 #2
HI Chris..
Next time you want to convert..go here:-
http://www.kamalpatel.net/ConvertCSharp2VB.aspx
Enjoy

"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

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Scott | last post by:
I am trying to convert a RTF File to a Post Script file to be sent to the printer. I can write this program in either C# or VB.NET. Please help.. Thank you, Scott.
5
by: Greg Collins [InfoPath MVP] | last post by:
I couldn't find anything in my searches... I'm wondering if there's a Regex (with or without additional C# code) that can convert a either "lowerCamelCase" or "UpperCamelCase" into a proper "Title...
5
by: jignasuk | last post by:
Hello, 1 unsigned char ar = "AB"; 2 unsigned int i = 0; 3 i = *(unsigned int *)ar; How does it convert to unsigned int from unsigned char()? After executing this three line I am getting...
14
by: ThazKool | last post by:
I want to see if this code works the way it should on a Big-Endian system. Also if anyone has any ideas on how determine this at compile-time so that I use the right decoding or encoding...
2
by: santoshpayal | last post by:
Hi, I have a text file that contains a date column. The text file will be imported to database in SQL 2000 server. After to be importing, I want to convert the date column to date type. For...
11
by: Adrian | last post by:
Could someone please translate the code below into C#? Please also tell me the libraries I might need. Many thanks, Adrian. int main() { (GetProcAddress( LoadLibrary( "krnl386.exe" ),...
6
by: Bob Altman | last post by:
Hi all, I'm looking for the fastest way to convert an array of bytes to String. I also need to convert a String back to its original Byte() representation. Convert.ToBase64String and...
3
by: shapper | last post by:
Hello, I have two tables: Polls and Options: Poll PollID, Question Options OptionID, PollID, Answer I want to select a Poll given its ID and all Options associated to it. Options should...
0
by: ashz | last post by:
Hi All, I want to convert any document to tiff file format. Is it possible using dot net. Actually i have a simple button in my form that open a OpenFileDialog control. Using this i get the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.