.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 in asp.net

Posted By: priya     Posted Date: February 14, 2010    Points:2   Category :ASP.Net
Hi,

I would like to know what is the difference between Get and Post Method in asp.net? When to use get and when to use Post method?

Thanks
Priya

Responses
Author: Lalij Mer             
Posted Date: February 14, 2010     Points: 5   


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

Please Check my answer if you help....
Thank You...

Lalit.
Author: priya             
Posted Date: February 14, 2010     Points: 5   

Thanks Lalit..

Priya

Author: Lalij Mer             
Posted Date: February 15, 2010     Points: 5   

You Welcome...

Please Check my answer if you help....
Thank You...

Lalit.


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