Sending variables from 1 form to another

garcon

Well-known member
Joined
Dec 13, 2004
Messages
47
Programming Experience
Beginner
Hi everyone,



I'm trying to send variables from a file called "DccSelection.aspx" to "WebForm1.aspx" using the post attribute of the form tag as follows:



<form name="DccResult" method="post" action="WebForm1.aspx?BaseCurrency=EUR&Culture=EN&BaseAmount=166.56"
id="DccResult">



Problem is though I don't know how to capture these variables in the "WebForm1.aspx" page. How do I do this? Here is the code from WebForm1:



Public Class WebForm1

Inherits System.Web.UI.Page



Dim baseAmount As String

Dim convertedBaseAmount As Int16

Dim baseCurrency As String

Dim baseCulture As String



Sub imgSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles imgSubmit.Click



End Sub
 

banditboy

New member
Joined
Dec 14, 2004
Messages
3
Programming Experience
10+
One of the issuse i had is that i could not do this posting so i just used the context variable .the form in a aspx submits to itself so i used the following

FirstPage.aspx
Dim Var1,var2,var3 as String
Submit_Onclick()
Context.items("Var1")= var1
Context.items("Var2")= var2
Context.items("Var3")= var3
Server.Transfer("SecondPage.aspx")

SecondPage.aspx
Dim Var1,var2,var3 as String
var1 = Context.items("Var1")
var2 = Context.items("Var2")
var3 = Context.items("Var3")
 
Top Bottom