Showing posts with label strange. Show all posts
Showing posts with label strange. Show all posts

Monday, March 26, 2012

Modal Popup onClickScript and encoding

Hello I have a strange problem and I'm not sure if I'm doing something wrong. I have a Modal Popup which I am adding dynamically to my page during pre-render. I have a string which I create using thePage.ClientScript.GetPostBackEventReference function and when I debug it looks fine. But when it converts to html the javascript is going from:

__doPostBack('MyControlID,'') in the debugger to:

__doPostBack(\u0027MyControlID\u0027,\u0027\u0027) in the source on the actual html.

Is there a way to tell the control to ascii encode or something along those lines. Or am I barking up the wrong tree and there is something else wrong with my code most likely?

Matt

Hi Matt,

Can you show me essential part of your code so that I can look into the issue?

Modal Popup not posting TextBox fields

I have a strange situation in which I am using a Model Popup Control with an embedded GridView containg TextBox controls in a column. I can DataBind the GridView in the codebehind and the TextBox controls are properly populated. However, when the pack posts back, the TextBox Controls always have an empty string for the Text property? This also occurs if I replace the GridView with a Repeater or any other list control.

Other controls, like labels, have there Text property available.

craig

You might want to look at this post:

http://forums.asp.net/thread/1328079.aspx

Look at the second page, at the last post with the JavaScript.

They have done some nice work with the modal regarding this issue I think.

There was also a workaround using the SubmitButtonBehavor = false;

Dont know if this will help you, but I thought I would give it a shot

Good luck

-Shane