Forms, POST problem

I have a simple HTML form that explicitly sends a POST request to a .aspx script,
where I process the submitted variables.

I personally have never had any problems using it, however sometimes, when someone
else uses it, data will get POSTed, and I might also see a HEAD or GET request, or
I might even see the POST data listed in plain text in the HTTP_REFERER address.

Does anybody know what's going on?

The form is explicitly set to send POST:

<FORM NAME="myform" ACTION="myscript.aspx" METHOD="POST" ONSUBMIT="return DoCheck()">

Why would HEAD or GET requests be sent?
Why would POST data even get sent as a GET request?

0
jmore
6/17/2007 9:44:21 PM
asp.net.web-forms 93655 articles. 5 followers. Follow

6 Replies
2721 Views

Similar Articles

[PageSpeed] 47

Well i din't find any problam in the code, are you changing Action/ method in DoCheck() javascript function ?


No body is perfect, I'm nobody
0
saifi_hasan
6/18/2007 5:26:11 AM

The DoCheck() function simply validates the string data.  It returns false
if the data is invalid, or returns true if ok.

I should say that it doesn't happen all the time.  Only once in a while.

My only guess is that it might have to do with the type of browser used,
or maybe they're using a third party download manager, or maybe they're refreshing
the webpage, etc...

I tried several times, but I simply can't reproduce this problem.
It works perfectly for me.  When I click on the Submit button, a single POST
request gets send to the page.  That's how it should work 100% of the time.

 

0
jmore
6/18/2007 5:58:04 AM

Wait a minute, you gave me an idea.

If Javascript is disabled, I suppose my form wouldn't work as expected,
because I'm calling a Javascript function.  Perhaps that is the source of my problem?

Is there another way to validate form data, and not use Javascript?

 

0
jmore
6/18/2007 6:11:26 AM

Hi

We recommend that you validate data on server side, it is safer than the client one.

User Input Validation in ASP.NET

http://msdn2.microsoft.com/en-us/library/ms972961.aspx


Best Regards
XiaoYong Dai
Microsoft Online Community Support

Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
0
XiaoYong
6/19/2007 9:19:01 AM

XiaoYong Dai – MSFT:

We recommend that you validate data on server side, it is safer than the client one.

Hi, not quite agree with you. Some primary validation still can be presented on client side in order to reduce web server overhead with redundant requests.

For instance, what reason in server side required field validation, or regular expression validation or etc? All these stuff can be done on the client side. But if you do need some complecated business logic validation ofcourse server side validation will be preferred. The only con I see against the client side validation is that it wont work if user will disable JavaScript in browser. But I think, in most cases its unlikely. And in any case the client side validation can be dublicated with the server side validation for reliable systems.

Just my two cents


Never ask users what they want, or they'll tell you
0
ArtemL
6/19/2007 9:33:12 AM

Hi ArtemL

Thank you for the very detailed explanation, I appreciate that very much. For a business web site, I think we should keep this on mind: 

  • never trust user input,
  • don't assume that user will enable the client side scripting.

I agree with you that client side validation can be dublicated with the server side validation. will reduce web server overhead.

 


Best Regards
XiaoYong Dai
Microsoft Online Community Support

Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
0
XiaoYong
6/20/2007 3:03:11 AM
Reply:

Similar Artilces:

Implementing .Net Form into an APS.net web form, can this be done
I am new here, but have been searching for a while, and may not have the correct lingo to find what I am looking for.  I am tasked with implementing a .exe application that was writen vb6 then converted to .net into a new website my team is developing. The idea is to put each of the 3 different forms in this .exe application of 3 different .aspx pages. I have attempted multiple things to get this into the page and even started to just rewrite it as an ASP.net web form, but even then I can't reuse any of the code since the System.Web.UI.Page doesn't inherit the sa...

Posting to Web Form with DropDownList from another form
I have a page with a drop down list that displays data on post back from the drop down list selected index change event. (call this form1) I need the ability to post to this page from another form (call this form2). there are about 6 options in form1. form2 will contain only 2 of these options displayed as simple hyperlinks. when the user clicks these links from form2 it needs to simply force a post back with that value from form2. id like to do this without javascript and id like to use the drop down list server control. anyone have a quick simple way to accomplish this? than...

windows forms in vb .net into web forms
we are creating a database driven website as part of our project. currently we have forms connecting to the database created in visual basic. these windows forms we need to convert into web forms which are asp .net compatible. can u give me an answer or show me a way. Hi, because of the difference in nature between web and win applications you'll need to reimplement at least the UI part. If you have a multitiered application in which the busines logic and data access are in different parts/assemblies you can reuse them. Grz, Kris.Read my blog. Handy Firefox plugins for web developers.Wor...

Web forms and mobile web forms
Hey everyone, I am looking to develope a web site that depending on the device connecting to it, it will display a certain page. In this case im looking to create a web and wap version of the same project. I have the Web forms version finished using ASP.NET and C# and I am wondering how to create the mobile web form and incorporate it in the project. In the project folder, can I just add a mobile web??? But what about displaying device specific pages?? Cheers -Dudach Yes, you can add mobile web forms and controls to your Web Application project. No problem. For device/br...

How to Make Web Forms from other Web Forms
In putting together an ASP.NET application for a biz application, we have come to the point where there are three different types of basic forms which have, for the most part, been perfected. Now its is a matter of cloning those forms for various uses and modifying or adding code to suit the particular need. Copy and paste works OK, but there is a lot of changing of certain words, etc. Is there a way in ASP.NET to take these basic forms, turn them into classes or templates, create forms from them, then add or overwrite code? ? (Anybody who is a Vis Fox Pro programmer would know imme...

Could PB .NET Web Form POST security Information to others web page??
This is a multi-part message in MIME format. ------=_NextPart_000_00F9_01C9C4D5.8FB45C90 Content-Type: text/plain; charset="big5" Content-Transfer-Encoding: quoted-printable Hi,=20 Have anyone came across the requesion to POST security informations from = PB .NET web form web page to other web site?? I have tried many datys, Could any kind man give me some suggessions?? thanks & Best regards Leon ------=_NextPart_000_00F9_01C9C4D5.8FB45C90 Content-Type: text/html; charset="big5" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML P...

how to place a <form> in web form form
i placed a <form> in the web form, but i can't submit coz i neet to submit to another web site how can i do??? Mike Chan You cannot submit a <form> to another page if you have a RunAt="Server" in the form tag. Remove that RunAt="Server" and you can (though then you will need to use plain old HTML inside that form). What are you trying to do? Why do you need to post to another form?Starting with ASP.NET 2.0? Look at:Programming Microsoft Web Forms My Blog COZ I NEED TO POST SOME INFORMATION TO ANOTHER WEB SITE IS THERE ANY OTHER SOLUTION?M...

Unusual problem where form parameters are not being passed to a .NET form
Hi, I am using Visual Studio 2005 on Windows 2003 (64 bit) and have a very unusual problem and would appreciate any help. Requirement - The Web application is part legacy part ASP part .NET. I have a requirement to show a Cyrstal PDF report in a new browser window. To do this I load and auto submit an ASP form which submits to a .NET form that opens in a new window. The .NET form generates the Crystal PDF file and response.redirects to display the report in the new window. Problem - On my development manchine (which hosts the web server) the application works as planned. Howeve...

For interrupting.web form Resized by position of the div : if div can't dispaly all (such as only top part , then web form heithten the heght),resize the web form
Web Form Resized by position of the div : if div can't dispaly all (such as only top part , then web form heithten the heght),resize the web form ! Because of my pool English, if you can't see , I will explain more ! ThanksGambler is the real life I guess you mean when form grows it also grow parent div element. This is normal. If you want div to stay fixed size and rather clip the form and maybe show a scrollbar, look at overflow property in CSS.Thanks------------------------------------------------------------This posting is provided "AS IS" with no warranties, and confers no ...

Include web form inside web form
I tried to include an aspx file in a asp.net web form. However, all the web controls (textbox, button) in the included page are not displayed when called. <Form id="Form1" method="post" runat="server"> <%   Response.writeFile("subPage.aspx"); %> <asp:button id="btnPrev" runat="server" text="Previous"></asp:button> </Form> There are some <asp:textbox> controls in the subPage.aspx file, the file itself works fine, but when it is included in the main page, all the controls are not displayed. Please assist. Thanks   u should u...

Web Form vs. Web Content Form
If you don't mind, I would like to know what is the difference between those two items, when I go to add a new item I see both of those and I don't know what the difference is.  A content form is for use with a masterpage. A web form is a standalone web page. If you select web content form, you will then have to specify a masterpage for it. and what is a master page used for?  Hi, a master page is used to give a constant look and theme to a site, without having to duplicate code. So basically you can put your header, menu, nav and footer on a master page. Then a...

Web Form embedded in another Web Form
Hi,  I have programmed a Web Form which acts like a scientific calculator. I would like to embedd this calculator in the upper left hand corner of another accounting Web Form. I don't want to host the calculator on the same server as the accounting page. I.e. I want them to have distinct URLs. Classically, I would do this using frames, but is there a better way using ASP? Is there some sort of Panel which can display the webpage at a specific URL which I can just drag onto my accounting Web Form? Thanks,  P1000   Frames are the only way to embed a webform inside ano...

Forms or No Forms
Hope this isn't a repeat.  I looked and didn't find anything. Say for example you had a web page with around 20 fields retrive and update to a database with differing datatypes.  Some fields will have some special controls (dropdowns, radios, buttons, etc) that interact with other parts of the page.  What is the best and/or most efficient code to make the page. Would you use a Formview bound to a standard ADO.net SQL connection and edit the templates. Use a Formview bound to an Object Data Source and edit within the templates. Or use an Object Data Source and bind the...

calling a web form from another web form
I would like to know what is the best way to open a web form from another web form. I would like to call it from a button control. Thanks Well, if I've grasped your question right, there are many methods to do that: 1)Response.Redirect > To navigate to another page from code and is equal to clicking a hyperlink. I suggest this as I think it's closer to your question. 2)Server.Transfer > This ends the current web form and begins a new web form. It's usable when you want to pass some variables i.e (Label1.Text) to the next immediate page. It's not safe though and not used to send p...

How to fire events in other web form from other web form ?
Suppose that I have A and B web form. I want to trigger B web form's Page_Load event from A web form. How can I do that ? Thanks in advanced WilbertWilbert Bujn Create a public method in B that call the load method : public void Load(object sender, System.EventArgs e) { Page_Load(sender, e) ; } In the page_load of A, instanciate a B object and then call the function B myB = new B() ; myB.Load() ; Quicky Thank you quicky, it works fine. WilbertWilbert Bujn...

Web resources about - Forms, POST problem - asp.net.web-forms

Problem novel - Wikipedia, the free encyclopedia
Working class, or proletarian novels are often also social problem novels . This was in many ways a reaction to rapid industrialization , and ...

Chris Christie has a problem with the presumption of innocence
Last night’s debate was more or less dominated by Ted Cruz and Donald Trump, but that doesn’t mean that it wasn’t riddled with deeply problematic ...

Is there a problem with Apple Music?
... page on my iOS device, the song or playlist began playback. In my case, the signup page didnt return until I force quit the app. The problem ...

BMW recalls i8 for stability control problem
Filed under: Green , Recalls , BMW , Safety , Coupe , Hybrid , Performance BMW will recall a small number of 2015 i8s because of a problem with ...

Tom Stoppard's "The Hard Problem"
by Doctor Science The American premiere of Tom Stoppard's latest play, "The Hard Problem", is at the Wilma Theater in Philadelphia. We went last ...

42% OF AMERICANS NOW REJECT 2-PARTY SYSTEM: Confirm That Government is the Problem
... the government topped the U.S. populace’s list of pressing grievances in a separate Gallup poll . They named it the nation’s number one problem ...

A matchstick-size implant that could be the answer to America's serious overdose problem is about to ...
... to 30% of people never fill their prescriptions in the first place, and others simply forget to take it or choose not to. That's a big problem ...

Donald Trump: 'Ted Cruz Is Very Nervous About 'Birther Problem'
Donald Trump did an interview Wednesday night on CNN with Erin Burnett and after he spent a good amount of time dissing Nikki Haley's speech, ...

Solving Campaign Finance Problems Through The Tax Code
Solving Campaign Finance Problems Through The Tax Code

NBC Entertainment Chief Denies Jimmy Fallon Has a Drinking Problem
Bob Greenblatt did admit that there have been 'conversations' about the late-night host's health and safety.

Resources last updated: 1/16/2016 3:13:47 AM