Monday, March 26, 2012

UpdatePanel -> window.close

Good morning @dotnet.itags.org. all

I am working on a ModalDialog window, there i have UpdatePanel over the whole modalDialog, Inside of it several atlas/ajax components.
Inside on top i have a Button to save the Datasheet/ Data fields. On other modals before i did it like so:

btnSave_Onlick -> save data to SQL and after it (last command) Response.Write ....window.close / PageStartupScript...window.close...
It worked fine in the past, but now the button is inside of the updatepanel and it throws out a Error with the response.write method,
and if i use StartupScript it just dont close the window. Is there any method to do this events inside of an updatePanel event?

Thanks for reponses
Marc

Specifially - Response.Write commands kill the whole microsoft.ajax enviroment - specifically with the new BETA. (I learned the hard way unknowningly)...

The alterantive is to just use a label or textarea (html) and assign values to after doing whatever you need to display after whatever processing. Little confused though are you talking window close as in IFRAME or modalpopup.show() hide()? Your post seems to indicate you are using an iframe and not a modal...

None the less if modal - then wrap the form or whatever you present in the modal in a panel and on successful submit make it not visible and assign a lable or generichtmlcontrol and display whatever message you want in it with a close button ...


hello.

if you're trying to insert javascript statements from a partial postback then use the new registerXXX static methods of the scriptmanager class.


Ok Thanks Luis i will remind it for further things :D
After all, for this i just brought my button outside of the panel...wasnt that big problem.

No comments:

Post a Comment