473,386 Members | 1,823 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,386 software developers and data experts.

Problem converting string to int after spliting.

In one web page, I redirect it to "prtDelReq.aspx?prtindex=0A2A3A8" after the
user click the button.

The prtindex actually contains many integers separated by 'A'.

On the prtDelReq page, I use QueryString("prtindex") to get the value. After
that, I use the Split method to get each integer, something like this:

Dim strItems As String = Request.QueryString("prtindex")
Dim arrItem() As String = strItems.Split("A")
Dim itemno As String

For Each itemno In arrItem

itemno = itemno.Trim
Dim arrIndex As Integer = Integer.Parse(itemno)
resultList.Add(wholeList.Item(arrIndex))

Next itemno

However, error occurs whenever it comes to Integer.Parse(itemno). It always
says that itemno is not in the correct format to convert into an Integer. How
can I resolve this problem?

Thank you in advance.
Nov 19 '05 #1
0 994

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

Similar topics

0
by: Lokkju | last post by:
I am pretty much lost here - I am trying to create a managed c++ wrapper for this dll, so that I can use it from c#/vb.net, however, it does not conform to any standard style of coding I have seen....
16
by: Dany | last post by:
Our web service was working fine until we installed .net Framework 1.1 service pack 1. Uninstalling SP1 is not an option because our largest customer says service packs marked as "critical" by...
1
by: =?Utf-8?B?SHVzYW0=?= | last post by:
Hi EveryBody: I posted the following code two days ago when I face problem that my code could not upload large data or to be prices more than 4 MB. The code are : Dim arrayImage As Byte()...
1
by: stanlopilolo | last post by:
Here, I have a string inside a static method. Something like "4.0+5.0i" and I want to parse it, to -at the end of the day-get a complex number 4+5i How exactly can I get to this? Spliting d...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.