Here's a nice, simple way to pass values from one page to another:
(VB.NET code)
'Add data to the context object before transferring
Context.Items("myParameter") = x
Server.Transfer("WebForm2.aspx")
Then, in WebForm2.aspx:
'Grab data from the context property
Dim x as Integer = CType(Context.Items("myParameter"),Integer)
Of course there are a number of ways to pass values from one page to
another, such as using the querystring, cookies, session,
context, saving to a temporary table in the database between each page, etc.
You'll have to decide which technique is best for your application.
Here are several good articles on the subject to help you decide.
http://msdn.microsoft.com/msdnmag/is...e/default.aspx http://www.aspalliance.com/kenc/passval.aspx http://www.dotnetjunkies.com/tutoria...tutorialid=600 http://www.dotnetbips.com/displayarticle.aspx?id=79
--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at
http://www.able-consulting.com
"Chung" <an*****@hotmail.com> wrote in message
news:08****************************@phx.gbl...
Hi all,
I have used the following code for doing the form
submission. I don't think this is a right way to submit a
from to a new aspx page because I need to add a dummy form
in between.
Could anyone tell me a proper way to do this?
Looking forward to your reply. Thanks!
Chung
My code:
<form id="Form1" method="post" runat="server">
<asp:Button id="Reset_btn" style="Z-INDEX: 125;
LEFT: 853px; POSITION: absolute; TOP: 504px"
runat="server" Width="82px" Height="59px"
Text="Postback"></asp:Button>
<form id="Dummy_Form">
</form>
<form id="Form2" method="post" action="New.aspx">
<INPUT style="Z-INDEX: 105; LEFT: 22px; WIDTH:
224px; POSITION: absolute; TOP: 11px; HEIGHT: 42px"
type="submit" value="Submit to New page">
</form>
</form>