473,404 Members | 2,178 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

My Asp.net aspx page always reports HttpMethod is "GET" even it is "POST" from client, ?

Visual Studio 2003
DotNet framework 1.1
Windows 2000 Pro

I create two pages in an Asp.net application, one is html page with a form
in it:
....
<form id="testForm" method="post" action="test.aspx" runat="server">
<input type="hidden" id="hiddenTest" value="hello, world">
<input type="submit" id="btnSubmit" value="submit">
</form>
....

Another one page is aspx page. It is a blank aspx page in which Request info
is shown in Page_load even handler:
private void Page_Load(object sender, System.EventArgs e) {

//show Request info

string httpMethod = Request.HttpMethod;

....

If I run this web application from the html page and click the submit
button, the aspx page gets called. But from debugger, the value of
Request.HttpMethod will always be "GET" rather than "Post". ???

Has anyone had this kind of problems before?

Thanks!!!




Nov 19 '05 #1
5 4550
You shouldn't post from one apsx page to another,

I know this seems alien if you have come from ASP development but aspx
pages should post back to them selves, let me know if you need any more
info

Nov 19 '05 #2
Yes, would you please suggest me some links to the related documentation
about this designed behavior that I can't use Http POST to send request to
an Aspx page?

Thanks,

<ga**********@gmail.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com...
You shouldn't post from one apsx page to another,

I know this seems alien if you have come from ASP development but aspx
pages should post back to them selves, let me know if you need any more
info

Nov 19 '05 #3
this is a good place to start

http://samples.gotdotnet.com/quickstart/aspplus/

don't get overwhelmed by it all, stick with it asp.net is strange at
first, but once you have used it for a little while you'll never go back

Nov 19 '05 #4
The exact same code works on another machine fine, isn't it weird?

HttpMethod is "POST" on that machine when the aspx page gets the request
from the Html page. ??? What is wrong with my machine!! grrrrrrrr.........
<ga**********@gmail.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com...
You shouldn't post from one apsx page to another,

I know this seems alien if you have come from ASP development but aspx
pages should post back to them selves, let me know if you need any more
info

Nov 19 '05 #5
Jeff wrote:
Yes, would you please suggest me some links to the related
documentation about this designed behavior that I can't use Http POST
to send request to an Aspx page?


Of course you can and you should (most of the time). What Gareth meant
to say is that in the ASP.NET model a page only sends requests to
itself, not to another page. Navigation is either performed by
Hyperlinks, Server.Transfer() or Response.Redirect().
Cheers,
--
http://www.joergjooss.de
mailto:ne********@joergjooss.de
Nov 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Rui Pestana | last post by:
Hello all, I want to use the POST method to submit the form and then grab the parameters in the asp file with request.form("parm"). The problem is that I am using the _search target to open...
1
by: Pete Mahoney | last post by:
Ok I use a textarea to store data input by the user, and then upon them clicking the submit button I store this data to a database. The problem is once the user inputs too much data (about 3...
1
by: brian | last post by:
i have a form processing being done by an asp page which works ok with "GET". two text inputs are sent and processing is done by an asp page which outputs the two values. with GET both values...
12
by: Assaf | last post by:
Hi all, My client is using an online service provider that processes survey responses. After a user fills survey.aspx and presses the OK button, 2 things need to happen: 1. the data has to...
6
by: James MA | last post by:
I'm now writing a small program to communicate a web server to simulate a web client. I use te httpwebrequest to talk with the server, and it works find for "POST" method, however, when i test...
14
by: Robert S | last post by:
I am trying to use POST to transfer data to another page. When I do this, '.' characters get converted to"_". For example: #index.html: <form action="test.php" method="post"> <input...
2
by: ReGex | last post by:
I have been working on a little project in C# to log into a website (using code inspired/riipped from http://www.codeproject.com/cs/internet/bloglivejournal.asp) but when I request the response,...
25
by: william.hooper | last post by:
here is my form: <html> <head></head> <body> <FORM ACTION="code.php" method="post"> <INPUT TYPE=SUBMIT NAME="arty.jpg" VALUE="Action"> </FORM>
14
by: terrible.theterrible4 | last post by:
Hello w3c,php, fedora + apache experts! Is there code I can use for POST A COMMENT? I am not ready for PHP yet. Anybody did it in JS?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.