Transfering to page then coming back again, save viewstate?

C

Colin Peters

Hi,

Following on from other questions on this issue.

Suppose I have a form and one of the fields is best populated from a
list which is held server side. So I have a button next to the field
which navigates to a new form which shows the list (maybe a list of
images, for example) and allows a selection to be made. Before I
transfer to the list I store the calling page name in some state
container so I know where to come back to when the selection has been
made. But what about the others fields that may already have been keyed
in up to now in my original data form. Should I store all these values
too? Is there a way to save the state of the form before the transfer
and reinstate them easily?

Sorry if this is a basic question. Any examples from tutorials would be
appreciated. I have looked but I guess I don't even know how this
problem /techniques is officially described.

Cheers
 
C

Colin Peters

Thanks. I'll give it a go.

But I was hoping to keep the site free from any dependence on client
side scripting. Is this a reasonable hope? Are there any asp.net apps
that strictly adhere to "no client scripting" evangelism?
 
E

Eliyahu Goldin

You should open the new form from client side with a javascript
showModalDialog call. The new form should return selected object in
window.returnValue property. The calling form will get it as a return value
of the showModalDialog call. No postback occurs on the calling form.

Eliyahu
 
C

Colin Peters

I take it that you don't fall into this group yourself :)

Anyway, the solution proposed works fine. Thanks very much. The function
is only for the site administrators anyway, so the scripting issue
shouldn't become crucial.
 
E

Eliyahu Goldin

But I was hoping to keep the site free from any dependence on client
side scripting. Is this a reasonable hope? No.

Are there any asp.net apps
that strictly adhere to "no client scripting" evangelism?
Probably some demo or prototype apps not usable in any real-life scenario.
 
C

Colin Peters

Woudl I be correct in thinking that this function doesn't work with Firefox?
 

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,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top