Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6949653
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:59:04+00:00 2026-05-27T13:59:04+00:00

What is the default form HTTP method? As stated in the link above an

  • 0

What is the default form HTTP method?

As stated in the link above an everywhere else the default posting method used in HTML forms is GET but I seem to get the POST methods results when NOT including the method=”” attribute in my form declaration:

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Ny test</title>
    <link rel="stylesheet" type="text/css" href="StyleSheet.css" />
</head>
<body>

    <form action="Default.aspx" runat="server">

    Name: <input type="text" id="navn" runat="server"/>
    <input type="submit" id="submit" value="Submit!" runat="server" />
    <input type="reset" />
    <br />

    </form>
</body>
</html>

The HTML code above results in the following output in the URL after the submit button is clicked:

http://localhost:62733/WebSiteTest/Default.aspx

When explicitly using the “GET” method attribute I get the following output in the URL after the submit button is clicked:

http://localhost:62733/WebSiteTest/Default.aspx?__VIEWSTATE=%2FwEPDwULLTE4OTM2NjcwNTBkZIRLV0rUSQgWDDv1sI1c1b%2Fj3fJXcWYiESG%2FlBGieAM4&__EVENTVALIDATION=%2FwEWAwK3qIiCDgK%2B2K%2BHBgLcu4S2BHrznTBZeKNNwWHoyMUQHB9lYE%2B7CEDwuP5UEvN7ULBt&navn=&submit=Submit%21“

Why is this happening? Default posting method for HTML forms is GET, so why I am getting the opposite results when not including GET as the method attribute?

Is this Visual Studio/ASP.NET defaulting to the POST method in HTML forms?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T13:59:05+00:00Added an answer on May 27, 2026 at 1:59 pm

    ASP.Net sets the method to POST for the form. I assume so that button presses result in POST requests which is more semantic than a GET and to prevent very long urls with the viewdata in the querystring.

    Check your HTML source and you will see the method="post" attribute.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When an HTML form is submitted without specifying a method, what is the default
<!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd> <html xmlns=http://www.w3.org/1999/xhtml> <head> <link href=StyleSheet.css rel=stylesheet
Take this scenario for an example: User types http://example.com/index.html into my form Form is
I have some kind of controller: @Controller public class DefaultController { @RequestMapping(value=/index.html, method=RequestMethod.GET) public
How do I set form number four as the default form that will run
C# question: I have a textBox in a default form Form1 and I want
I've noticed that the MS ajax framework touches the action of the default form
By default the form post CSRF protection in Rails creates an authenticity token for
When I use the default model binding to bind form parameters to a complex
I have a form with some radio buttons that are disabled by default. When

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.