Send Form in ASP .NET

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
 
G

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
 
J

Jonel Rienton

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
 
G

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.

login.aspx is another page, not the same.


grzybek
 
J

Jonel Rienton

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,906
Latest member
SkinfixSkintag

Latest Threads

Top