Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

modalpopupextender and commas appearing in my textbox asp.net

Some weird stuff is happening, I am converting an application that used to use javascript to open another web page in a tiny window for data input to use a ModalPopupExtender.

It seems to work fine, but in the OK event, when I do txtData.Text (the textbox in my modal popup), it comes back with a comma before the data, so if you type "Rabbit", it comes back as ",Rabbit".

Also when I use it multiple times, in another place where I might click to show it, and type "Fish", it starts coming back with stuff like ",Rabbit,,Fish"

I don't know why or how to stop it from doing this... any ideas?

like image 601
NibblyPig Avatar asked Oct 19 '09 10:10

NibblyPig


1 Answers

Same here. No clue for why it happens. Every postback initiated by buttons within the panel adds commas and previous values to all text fields.

Hooking into TextBox.Text setter revealed that the corrupted data comes from postdata collection. So it means that just before postback the ModalPopupExtender corrupts the data.

P.S. I'm not using UpdatePanel, but regular Panel so there are no triggers associated with buttons.

Updated: Solution found.

The problem seems to go away when rolling back to May's release of AjaxToolKit (http://ajaxcontroltoolkit.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=27326).

like image 133
Roman Royter Avatar answered Nov 15 '22 19:11

Roman Royter