Wednesday, March 21, 2012

ATLAS replacing redered control ids incorrectly

I have multiple update panels on a page. When i fire a control event inside one of these panels, i get an alert window saying something like:

"An async postback was caused by a control within $ctl0$myPlaceholder$myUpdatePanel . . . but the update panel could not be found on the page."

when i view the source in my code, however, the actual id or name of the div that is the rendered updatepanel is "_ctl0_myPlaceholder_myUpdatePanel".

I am not sure why this is happening. has anyone seen this before? suggested fixes?

Hi,

you should view posts at:

http://gregdotnet.blogspot.com/ - about web.config element xhtmlconformance and
http://forums.asp.net/thread/1211330.aspx - about naming the controls

Basicly what you need to check is that if you have any dynamicly added controls assign them id's when they get added to the controls collection. This way the control id's at runtime don't get rendered with ctl04_ and such. Worked for me.

No comments:

Post a Comment