Val function in vb.net problem
-
i am reterving a integer value by querystring. e.g In page load dim Value as double Value = Val(Request.QueryString("Val") & 0) now when val =10.0 then it works fine. when val=10 then it return 100 cud anyone tell me the reason of this??
One person's data is another person's program. --J.Walia
-
i am reterving a integer value by querystring. e.g In page load dim Value as double Value = Val(Request.QueryString("Val") & 0) now when val =10.0 then it works fine. when val=10 then it return 100 cud anyone tell me the reason of this??
One person's data is another person's program. --J.Walia
i dono vb.net but in c# i use like this and it works fine //double d = double.Parse(Request.QueryString["val"].ToString());
Padmanabhan
-
i am reterving a integer value by querystring. e.g In page load dim Value as double Value = Val(Request.QueryString("Val") & 0) now when val =10.0 then it works fine. when val=10 then it return 100 cud anyone tell me the reason of this??
One person's data is another person's program. --J.Walia
Instead of Val(), use Convert.ToInt32() or Convert.ToDouble().
Dim value as Double = Convert.ToInt32(Request.QueryString("val") & "0")
or
Dim value as Double = Convert.ToDouble(Request.QueryString("val") & "0")