Complex webform

  • Thread starter Thread starter Kenneth
  • Start date Start date
K

Kenneth

Hi,

I've tried to do a calendarForm that should be reused from
many forms. It will return a datetime object in a session
variable.

I have a webform (parentForm) that has a dropdownlist, a
few textboxes and two imagebuttons. AutoPostback is true
for the dropdownlist and thus affects at least one
textbox. Therefore a need for an isPostBack is necessary
in the form's Page_Load.

The imagebuttons opens a new javascript window (childForm)
(Page.RegisterStartupScript....) comprising a calendar
object and some buttons. When the Update button on the
childForm is pressed I set a session variable and refresh
the parentForm by using a javascript
(Page.RegisterStartupScript . . .) with

window.opener.location.href=window.open.locarion.href

that updates the corresponding datetime object.

The backside with this seems to be that all other objects
on the parentForm also update to their initial values,
they doesn't keep their values through ViewState.

Can I use some other parentForm javascript refresh?

Does a
window.opener.location.href=window.open.locarion.href
do the same as a response.redirect?

Any suggestions?

TIA

/Kenneth
 
Kenneth said:
Can I use some other parentForm javascript refresh?

Does a
window.opener.location.href=window.open.locarion.href
do the same as a response.redirect?

Any suggestions?

TIA

/Kenneth

I would try using a Javascript solution:

http://aspalliance.com/articleViewer.aspx?aId=87&pId=1

Yes, I believe your code before does a redirect (a GET). If you wanted
it to postback, you'd need to call the __doPostBack JS function
yourself, or just submit the form (once again, JS)....
 
Back
Top