Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Server.Execute - how to get back to calling form
Message
De
16/10/2003 04:54:15
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00839135
Message ID:
00839145
Vues:
23
Hello Rick

Thanks for your reply

I am very new to .net and so some of what I am saying in .net terms may not make much sense, if I describe my problem then could you describe the best way I can achieve what I want.


I have a main data entry form.
On this form is a textbox that contains a list.
This list has to be populated from a specific list of items the user can choose from.

How should I go about achieving this.

At present I have a button on my main form that launches a form that has 2 list boxes on it allowing the user to Move items from one box to another.

My problem is that when I call my Mover form and get my selection I somehow have to get back to my main data entry form which is now gone.

I realise I can do all this by saving my Main Forms values to Session and then running my Main form again and restoring from session, but since this would be a big save to session I wondered if there was a better way of doing.


Thanks in advance
















>Server.Execute is meant to pass control to another page and return the output. You can let it render on its but when you do the output it generates goes directly into your output.
>
>Here's the example from the help file:
>
>
>StringWriter writer = new StringWriter();
>Server.Execute("Login.aspx", writer);
>Response.Write("<H3>Please Login:</H3><br>"+ writer.ToString());
>
>
>that demonstrates this process
>
>What you want to do is pass in a TextWriter object, let the other page run and render its HTML and return the TextWriter with the Captured HTML. Whether this works for you really depends on what you need to accomplish.
>
>If you really need to transfer to another page and let it do its thing INSTEAD of the current page then you should use Server.Transfer() or Response.Redirect(). Server.Transfer leaves you in the current Request context while Response.Redirect completely gets out and back in from the client.
>
>
>
>
>>I am wrting a web application using vb code behind.
>>
>>I have a utility form (it a data Mover type utility) that I need to call from my main data entry web form.
>>My current understanding is that when I call my mover form I will lose my existing form so I will have to save all my text boxes out to session.
>>
>>The Server.Execute method allows the current ASPX page to execute a specified ASPX page on the same web server. After the specified ASPX page is executed, the control transfers back to the original page from which the Server.Execute method was called.
>>
>>This would be very useful way for my mover form to work since it would avoid me having to do a large save to session prior to launching my mover form.
>>
>>However my first attempt to get this working just overlayed the controls from my mover form onto my display form instead of first clearing my form. This was not the desired effect.
>>In Addition I can not find out how to make my main display form regain its normal appearence.
>>
>>What am I doing wrong in all this.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform