Complex webform

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
 
C

Craig Deelsnyder

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)....
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top