Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > My Asp.net aspx page always reports HttpMethod is "GET" even it is "POST" from client, ?

Reply
Thread Tools

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

 
 
Jeff
Guest
Posts: n/a
 
      05-20-2005
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!!!










 
Reply With Quote
 
 
 
 
garethdjames@gmail.com
Guest
Posts: n/a
 
      05-20-2005
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

 
Reply With Quote
 
 
 
 
Jeff
Guest
Posts: n/a
 
      05-20-2005
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,

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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
>



 
Reply With Quote
 
garethdjames@gmail.com
Guest
Posts: n/a
 
      05-20-2005
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

 
Reply With Quote
 
Jeff
Guest
Posts: n/a
 
      05-20-2005
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.........


<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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
>



 
Reply With Quote
 
Joerg Jooss
Guest
Posts: n/a
 
      05-25-2005
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
(E-Mail Removed)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why my working ps/2 mouse freezes and even don't even get recon.after reboot ? demi General Computer Support 0 08-03-2007 05:30 AM
Why my working ps/2 mouse freezes and even don't even get recon.after reboot ? demi General Computer Support 0 08-03-2007 05:28 AM
modify HttpMethod or HttpRequest propertys Andreas Schulze ASP .Net Web Services 3 11-18-2004 10:53 PM
HttpMethod is always GET Edvin ASP .Net Mobile 0 07-22-2003 09:01 AM
Even older fart, even newer newbie Stan Goodman Java 11 07-04-2003 07:32 AM



Advertisments