Hi
I have a webdropdown with certain date values in it.
When I change the selected value and try to access it using .CurrentValue method it returns the value with certain control chars e.g. 2013%2f/07%2f/31. However, if the selection is not been changed the .CurrentValue contains the right value e.g. 2013/07/31
Why is this so? And how can I get the value in the selection after the selection is changed?
thanks
Adi
Hello Adi,
I made a test project and I get the control characters too.
It seems like some encoding or decoding is done to the value. To work around this, I first tried to use HttpUtility.HtmlEncode() or HttpUtility.HtmlDecode(), but it didn't make any change.
Instead, I used String.Replace to get the expected result:
String value = WebDropDown1.CurrentValue;value = value.Replace("%2F", "/");
I have attached my sample. I hope it helps.
Elizabeth AlbertLocalization Engineer