Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Request.Form

Status
Not open for further replies.

nphani

Technical User
Feb 10, 2002
104
US
Can we use Request.Form in ASP.Net. I am finding it difficult using it as it doesn't give any error, but also doesnot produce any data.
Can somebody guide me to some articles on this? I have tried but unsucceful.

Thanx in advance,
Phani
 
What's the purpose for using it? A code snappit would be helpful.
 
You don't really need to use it any more. You can just reference the control.
 
"You can just reference the control" or "A code snappit would be helpful"
Can you please explain that?

I actually want to pass data from form1 to form2 and access all the form variables of form1 in form2. I used to do it using Request.Form in ASP but am not sure what would be the best way of doing it in ASP.Net. Can somebody help me with that...

Phani
 
What ThunderBear6 was saying that in ASP .Net there is no need to post the form data to another page in order to process it, you can reference control values in page code behind. There should be a bunch of samples in your .Net SDK Help.
 
Request should still work. If you're using c# the code would be:

Request.Form["YourVariable"]

I think VB would be:

Request.Form("YourVariable")

What would fail is if it is null (or nothing) and in the case you have to check to see if its null before you try to get the value out of it.

Erica
 
For some reason the square brackets are missing around the c# version.

Erica
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top