jppinto
asked on
Convert Request.QueryString to Integer
Hello,
I've
Public IDTopico As Integer
I'm trying to assign the QueryString("id") to the IDTopico. I've tryed like this two ways and I get error messages:
IDTopico = Request.QueryString("id") (Error:"Conversion from string "'1'" to type 'Integer' is not valid.")
or this
IDTopico = ConvertRequest.QueryString ("id") (Error:"Input string was not in a correct format.")
Can someone help me please?
thanks,
jppinto
I've
Public IDTopico As Integer
I'm trying to assign the QueryString("id") to the IDTopico. I've tryed like this two ways and I get error messages:
IDTopico = Request.QueryString("id") (Error:"Conversion from string "'1'" to type 'Integer' is not valid.")
or this
IDTopico = ConvertRequest.QueryString
Can someone help me please?
thanks,
jppinto
ASKER
I think that your code is not correct. Int.Parse is not valid code!
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
int.Parse(Request["id"])