I am using Int32.Parse() to convert the value of a DropDownList; however the returned value after conversion is:
0x0001
instead of the expected 0.
My code is:
myObject.Id = Int32.Parse(ddlName.SelectedValue);
The selected value is “0” in this case. Why does it return a ‘0x0001’ instead of a 0? What is happening and is that a memory register address?
Are you checking through debug Window ?
Check if you have enabled Viewing as Hex in Visual studio watch.