Send Form in ASP .NET

  • Thread starter Thread starter grzybek
  • Start date Start date
G

grzybek

Hi,
I've done form in my .aspx page on the client side
and I want to using metod "post" get some variables
in next page .aspx using Request.QueryString["name"],
but it doesn't work.
Is it possible to do on the client side?

I only invented on the server side using :
Response.Redirect("page1.aspx?var=" +
System.Web.HttpUtility.UrlEncode(TextBox1.Text));
in Button_click function,
and then Request.QueryString works in page1.aspx file!

How can Ido it in other way ?

Thanks in advance.

Regards,
grzybek
 
Request.Form["name"];
It's easier ;-)

I have in :
<form id=name action="login.aspx">
<input id="user" type="text ...... >
<input id="pass" type=password" ...... >
<input id="button1" type="submit" ......>
</form>

and in login.aspx I try : (in order to test values I put it in TextBoxes)
TextBox1.Text = Request.QueryString["user"];
TextBox2.Text = Request.QueryString["pass"];

It doesn't work.
How should I do it ?

( Of course, I've tried Request.Form["name"] as well . )

Besides, is it good way to auth using user and pass in SQL database?
Then I will need properly rights to that user in next parts of application.


Thanks,
grzybek
 
grzybek said:
Request.Form["name"];
It's easier ;-)


I have in :
<form id=name action="login.aspx">

<input id="user" type="text ...... >
<input id="pass" type=password" ...... >
<input id="button1" type="submit" ......>
</form>

and in login.aspx I try : (in order to test values I put it in TextBoxes)
TextBox1.Text = Request.QueryString["user"];
TextBox2.Text = Request.QueryString["pass"];

It doesn't work.
How should I do it ?

( Of course, I've tried Request.Form["name"] as well . )

Besides, is it good way to auth using user and pass in SQL database?
Then I will need properly rights to that user in next parts of application.


Thanks,
grzybek

unless the page login.aspx is the same page with all the code you write
then, it will not work. see my changes above.

cheers,
Jonel
 
unless the page login.aspx is the same page with all the code you write
then, it will not work. see my changes above.

login.aspx is another page, not the same.


grzybek
 
grzybek said:
login.aspx is another page, not the same.


grzybek

grzybek,

then it will not work, AFAIK, the webform can only post to itself.

regards,
Jonel
 
Back
Top