Coma getting added in a textbox, placed inside an update panel, on prefill


Problem:

A comma is getting appended to a textbox (textbox needs to be inside an update panel), each time a partial refresh happens in that page.

Solution:

The issue happened especially when i was populating the textbox, from the query string. Most importantly duplicate entries in the query string. 

ex: www.xyz.com?id=123 & val=rrq & id =  & nxt_Val=12

The id is repeating in the above query string. And the same value is populated in the textbox. In this case, the textbox will have the value prefilled as 123,  with a comma getting appended. This is normal and the issue is because of the duplicate id in the querystring. While prefilling the textbox with Request.QueryString[“id”] a comma gets added. Just avoid duplicate querystring keys to solve this issue.

Hope this helps.

Feel free to leave a reply here...

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s