Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: Please help me to get data of form (from Request object)....


Message #1 by "Quynh D. Nguyen" <quynhnguyen@b...> on Fri, 9 Mar 2001 22:24:14 +0700
Hi all,



Thanks for helpful our discussion.



I have a big problem in ASP.Net, can anyone help me to solve this.



I have a HTML form (sample code below)



<form id=frmTest method="post" action="getdata.aspx?Action=Save">

	<input type="text" id="txtName" value="Getting Started with ASP.net">

	<input type="text" id="txtDescription" value="I can't do it.">

</form>



When I submitted this form to the web server, I didn't know the way to get

value from two controls in the form.



I used some syntax (from classic ASP) below:



	strName = Request.Form("txtName")

	strDesc = Request.Form("txtDescription")



But the compile always tells me the syntax not correct or error. I don't

know why?



Can anyone help me to get data by Request object like the classis ASP? Help

me someone?



Thanks for any ideas....



Quynh D. Nguyen



Message #2 by "Thompson Computing" <johnthom@b...> on Sat, 10 Mar 2001 21:44:11 +1000
mebbe u should have name="txtName" and not id="txtName" in your html

----- Original Message -----

From: Quynh D. Nguyen <quynhnguyen@b...>

To: ASP+ <aspx@p...>

Sent: Saturday, March 10, 2001 1:24 AM

Subject: [aspx] Please help me to get data of form (from Request object)....





> Hi all,

>

> Thanks for helpful our discussion.

>

> I have a big problem in ASP.Net, can anyone help me to solve this.

>

> I have a HTML form (sample code below)

>

> <form id=frmTest method="post" action="getdata.aspx?Action=Save">

> <input type="text" id="txtName" value="Getting Started with ASP.net">

> <input type="text" id="txtDescription" value="I can't do it.">

> </form>

>

> When I submitted this form to the web server, I didn't know the way to get

> value from two controls in the form.

>

> I used some syntax (from classic ASP) below:

>

> strName = Request.Form("txtName")

> strDesc = Request.Form("txtDescription")

>

> But the compile always tells me the syntax not correct or error. I don't

> know why?

>

> Can anyone help me to get data by Request object like the classis ASP?

Help

> me someone?

>

> Thanks for any ideas....

>

> Quynh D. Nguyen

>

>

>

Message #3 by "Quynh D. Nguyen" <quynhnguyen@b...> on Sun, 11 Mar 2001 13:23:49 +0700
Yeah,



I was followed your suggestion and it worked fine.



Thanks for your help.







-----Original Message-----

From: Thompson Computing [mailto:johnthom@b...]

Sent: Saturday, March 10, 2001 6:44 PM

To: ASP+

Subject: [aspx] Re: Please help me to get data of form (from Request

object)....





mebbe u should have name="txtName" and not id="txtName" in your html

----- Original Message -----

From: Quynh D. Nguyen <quynhnguyen@b...>

To: ASP+ <aspx@p...>

Sent: Saturday, March 10, 2001 1:24 AM

Subject: [aspx] Please help me to get data of form (from Request object)....





> Hi all,

>

> Thanks for helpful our discussion.

>

> I have a big problem in ASP.Net, can anyone help me to solve this.

>

> I have a HTML form (sample code below)

>

> <form id=frmTest method="post" action="getdata.aspx?Action=Save">

> <input type="text" id="txtName" value="Getting Started with ASP.net">

> <input type="text" id="txtDescription" value="I can't do it.">

> </form>

>

> When I submitted this form to the web server, I didn't know the way to get

> value from two controls in the form.

>

> I used some syntax (from classic ASP) below:

>

> strName = Request.Form("txtName")

> strDesc = Request.Form("txtDescription")

>

> But the compile always tells me the syntax not correct or error. I don't

> know why?

>

> Can anyone help me to get data by Request object like the classis ASP?

Help

> me someone?

>

> Thanks for any ideas....

>

> Quynh D. Nguyen

>

>

>

  Return to Index