Monday, March 26, 2012

passing values from one web form to another web form

I have a web form welcome.asp and it has three textboxes and two
dropdown list. It has one button called Submit.
when I click that button it should pass all the data from text boxes
and dropdown lists to another web form named processform.aspx.
So, my question is how can I pass the data from one web form to
another web form by clicking abutton.
ThanksIf you are using Server.Transfer method or cross-page posting, you can use
PreviousPage property to access the originating page.
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
<bbawa1@.yahoo.com> wrote in message
news:1181585117.479238.102680@.n15g2000prd.googlegroups.com...
> I have a web form welcome.asp and it has three textboxes and two
> dropdown list. It has one button called Submit.
> when I click that button it should pass all the data from text boxes
> and dropdown lists to another web form named processform.aspx.
> So, my question is how can I pass the data from one web form to
> another web form by clicking abutton.
> Thanks
>
If this is a form post, you also have access to either the form or the query
string.
"Eliyahu Goldin" <REMOVEALLCAPITALSeEgGoldDinN@.mMvVpPsS.org> wrote in
message news:OZWVDQFrHHA.3456@.TK2MSFTNGP02.phx.gbl...
> If you are using Server.Transfer method or cross-page posting, you can use
> PreviousPage property to access the originating page.
> --
> Eliyahu Goldin,
> Software Developer & Consultant
> Microsoft MVP [ASP.NET]
> http://msmvps.com/blogs/egoldin
>
> <bbawa1@.yahoo.com> wrote in message
> news:1181585117.479238.102680@.n15g2000prd.googlegroups.com...
>
On Jun 11, 12:15 pm, "Eliyahu Goldin"
<REMOVEALLCAPITALSeEgGoldD...@.mMvVpPsS.org> wrote:
> If you are using Server.Transfer method or cross-page posting, you can use
> PreviousPage property to access the originating page.
> --
> Eliyahu Goldin,
> Software Developer & Consultant
> Microsoft MVP [ASP.NET]http://msmvps.com/blogs/egoldin
> <bba...@.yahoo.com> wrote in message
> news:1181585117.479238.102680@.n15g2000prd.googlegroups.com...
>
>
>
>
>
> - Show quoted text -
When I use Server.Transfer["ProcessForm.aspx"]; my btn_click event
it gives me following error message
only assignments, call, increment, decrement, and new object
expressions can be used as a statement
cannot apply indexing with [] to an expression of type 'method group'
Ysgrifennodd bbawa1@.yahoo.com:
> I have a web form welcome.asp and it has three textboxes and two
> dropdown list. It has one button called Submit.
> when I click that button it should pass all the data from text boxes
> and dropdown lists to another web form named processform.aspx.
> So, my question is how can I pass the data from one web form to
> another web form by clicking abutton.
> Thanks
>
I take the view that computer programs are usually modeling some real
world object or objects. I therefore construct server side object(s)
that store information entered via Pages in its/their state variables
(fields/properties/attributes).
On submit, I do any validation of the data that is required, store the
data in the object(s) and then store a reference to the object(s) in the
Session.
It is then a simple matter to retrieve that object and its data from the
Session in any subsequent form.
HTH
Peter
ASP.NET provides a plethora of ways to pass data between pages.
I've detailed virtually every technique here:
http://SteveOrr.net/articles/PassData.aspx
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net
<bbawa1@.yahoo.com> wrote in message
news:1181585117.479238.102680@.n15g2000prd.googlegroups.com...
>I have a web form welcome.asp and it has three textboxes and two
> dropdown list. It has one button called Submit.
> when I click that button it should pass all the data from text boxes
> and dropdown lists to another web form named processform.aspx.
> So, my question is how can I pass the data from one web form to
> another web form by clicking abutton.
> Thanks
>

0 comments:

Post a Comment