UI not updating in calling page

D

desmcc

Hi,
I am launching a modal dialog through the usual javascript
(window.showmodaldialog). When the modal dialog is complete (ie user
selects OK), the calling page then refreshes itself by setting the
location.href of the window to be itself (ie the modal dialog changes a
label on the calling page ). I can see that this causes the page load
code of the calling page to execute in the code behind page. I can also
see clearly that this updates the value of a label on the calling page
but unfortuately, the label in the UI of the calling page is not
updated when I view the form after its finished reloading.
Does anyone know how, when the correct code behind code executes and
updates the label but ASPDotNet doesn't relfect the label change in the
UI ?

thanks for any badly needed help!
Des.
 
G

Guest

I think what is happening here is that the ViewState value for the control is
overwriting the value placed in the label by your Javascript.

Try using a server-side HTML Hidden element instead of the label; during the
Page Load / Postback event you can populate the label from the Hidden
element. That way the value in the label will persist across postbacks.

You might also want to try using the Form.Submit method to cause the
postback from Javascript, though it sounds like your method works fine.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top