Sunday, 8 September 2013

No implicit conversion between int and string

No implicit conversion between int and string

When i try to execute this belo code i'm getting that error.
//Code:
int Value = Convert.ToInt32(Request.QueryString["Value"] == null ? 0 :
Request.QueryString["Value"]);
So i need to pass the value '0' if the QueryString value is null.
How can i solve this?

No comments:

Post a Comment