.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

What is the difference between Get and Post method?

Posted By: Suma     Posted Date: July 30, 2009    Points:2   Category :ASP.Net
hello Friends,

What is the difference between Get and Post method used in asp.net web application?

Thanks
Suma

Responses
Author: Faizal             
Posted Date: July 30, 2009     Points: 5   

Hello Suma,

One by one comparison between get and Post Method

GET Method:

1.All the name value pairs are submitted as a query string in URL.
It's not secured as it is visible in plain text format in the Location bar of the web browser.

2.Length of the string is restricted.


3.If get method is used and if the page is refreshed it would not prompt before the request is submitted again.

4.One can store the name value pairs as bookmark and directly be used while sharing with others - example search results.


POST Method:

1. All the name value pairs are submitted in the Message Body of the request.

2. Length of the string (amount of data submitted) is not restricted.

3. Post Method is secured because Name-Value pairs cannot be seen in location bar of the web browser.

4. If post method is used and if the page is refreshed it would prompt before the request is resubmitted.

5. If the service associated with the processing of a form has side effects (for example, modification of a database or subscription to a service), the method should be POST.

6. Data is submitted in the form as specified in enctype attribute of form tag and thus files can be used in FileUpload input box.

For more refer this link

http://wiki.answers.com/Q/What_is_the_difference_between_get_and_post_method_in_HTTP

Some more URL will help you

http://www.cs.tut.fi/~jkorpela/forms/methods.html

http://www.plus2net.com/asp-tutorial/form-diff.php

Author: Syed Shakeer Hussain             
Posted Date: July 31, 2009     Points: 5   

Hi Suma,
Check the below Link for more answer.
http://www.dotnetspark.com/userdotnetquestion/syedshakeer-Page-4.aspx

Author: Syed Shakeer Hussain             
Posted Date: July 31, 2009     Points: 5   

Hi Suma,
Check the below Link for more answer.
http://www.dotnetspark.com/userdotnetquestion/syedshakeer-Page-4.aspx

Author: Nabin             
Posted Date: August 27, 2009     Points: 5   

hi friend

In case of get method all the value u passed are passed as the query string in the url. so it is nor secure, and can he seen by the user and chances of hacking.

In case of past method all the values are passed as the message body and cant be seen. so it is more secure.


Thanks
Nabin

Author: Rowan             
Posted Date: May 05, 2010     Points: 5   

GET. Usually used to fetch pages. If extra data needs to be sent (i.e from a form) in the request it is put in the querystring.

POST. Usually used to post data (forms). Extra data can now also be put into to the body of the request. The receiving web server can see the data, but it's not visible in the url.

The advantage of GET is that all the data is in the URL, so you can provide additional data by just providing a link with the correct querystring, such as http://phpforms.net/tutorial/html-basics/form-builder.html form builder.

The disadvantage is that the URL imposes a limit on the amount of data that can be sent, and maybe you don't want the data to be easily modifiable.

Author: Imran             
Posted Date: November 11, 2011     Points: 20   

As per functionality both GET and POST methods were same.Difference is GET method will be showing the information information to the users.But in the case of POST method information will not be shown to the user.

The data passed using the GET method would be visible to the user of the website in the browser address bar but when we pass the information using the POST method the data is not visible to the user directly.

Also in GET method characters were restricted only to 256 characters.But in the case of POST method characters were not restricted.
Get method will be visible to the user as it sended appended to the URL, put Post will not be visible as it is sent encapsulated within the HTTP request body.


About the data type that can be send, with Get method you can only use text as it sent as a string appended with the URL, but with post is can text or binary.


About form default, Get is the defualt method for any form, if you need to use the post method, you have to change the value of the attribute "method" to be Post.


Get method has maximum length restricted to 256 characters as it is sent appended with the URL, but the Post method hasn't.

Get method has limitataion in the size of data tranamitted, but post method hasn't.

Read more: http://www.techyv.com/questions/difference-between-get-and-post-methode


Author: suryak             
Posted Date: December 29, 2011     Points: 20   

Check this link for summarized comparison.
http://getpostcomparison.blogspot.com




Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend