Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
| Search | Today's Posts | Mark Forums Read
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 27th, 2010, 04:34 PM
Authorized User
 
Join Date: Mar 2010
Posts: 27
Thanks: 2
Thanked 1 Time in 1 Post
Default receive data from POST form

How I can receive data from POST form
 
Old March 27th, 2010, 04:37 PM
samjudson's Avatar
Friend of Wrox
Points: 8,687, Level: 40
Points: 8,687, Level: 40 Points: 8,687, Level: 40 Points: 8,687, Level: 40
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2007
Location: Newcastle, , United Kingdom.
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

Exactly the same way you receive data from a GET form...

A bit of context might help us to help you. How are you sending the post to the form? Are we talking a winforms or library code? Some javascript? A ASP.Net or WCF class?
__________________
/- Sam Judson : Wrox Technical Editor -/

Think before you post: What have you tried?
 
Old March 27th, 2010, 05:26 PM
Authorized User
 
Join Date: Mar 2010
Posts: 27
Thanks: 2
Thanked 1 Time in 1 Post
Default I need receive data from POST form

I tray like this :
in page Default.aspx
Code:
<form id=""  action="test.aspx" method= "GET" >
in page test.aspx.cs
Code:
string a = Request.QueryString["Name"];
 Response.Write(a);
it is worked will but I want (PPST not GET)
 
Old March 27th, 2010, 05:40 PM
samjudson's Avatar
Friend of Wrox
Points: 8,687, Level: 40
Points: 8,687, Level: 40 Points: 8,687, Level: 40 Points: 8,687, Level: 40
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2007
Location: Newcastle, , United Kingdom.
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

Well the simple answer is if you really need to do this then use Request.Form["Name"].

However if you are using ASP.Net then are you not doing postback and using server side controls? e.g. in your HTML:

<asp:TextBox runat="server" ID="TextBox1">

Then in your C# code:

string a = TextBox1.Text;

Are you using Visual Studio? If so then I recommend you look into finding some basic tutorials as you appear to be doing things the hard way.
__________________
/- Sam Judson : Wrox Technical Editor -/

Think before you post: What have you tried?
The Following User Says Thank You to samjudson For This Useful Post:
msomar (March 27th, 2010)




Similar Threads
Thread Thread Starter Forum Replies Last Post
Submitting POST data without a form takabyte Classic ASP Basics 15 April 28th, 2014 01:44 AM
Can I receive email when my post is replied to? ababb Forum and Wrox.com Feedback 2 December 16th, 2004 10:39 AM
How to Read and Receive data from a port Vijay_VB VB How-To 1 August 14th, 2004 05:01 AM
not able to receive xml data unniml Classic ASP XML 0 January 30th, 2004 09:00 AM
Using XMLHTTP to POST form data channer Classic ASP XML 8 January 6th, 2004 05:44 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.