Posted on 2012-08-16
Last Modified: 2012-09-11

I am bit confusing with httpverbs in , if i look in to my project

 the verbs was added in web.config file as follows

<add verbs= * type=... >

as i know * indicates  GET,PUT,HEADER,DELETE,POST... etc i have searched in google

where i have found only the defination for those but i did not get any examples to know

how it will be used and where it will be used because i have the code as follows

in abc.aspx

  under button click event it is calling the  businesslayer the method say GetDetails()

  and now under this Business layer method it is calling  two methods in the datalayer as follows

   DeleteExisingRecords() // it will delete the existing records in database

   AddNewRecords()  // it will Add the New records in to database

Now please clarify the following

1) where exactly and what types of verbs are used in the in my above code

2) if possible  please provide me an example with each of verb where and how it is used.

            many thanks in Advance.
Question by:praveen1981
    LVL 82

    Assisted Solution

    by:Dave Baldwin
    You do not choose the verb that is used.  If you do a simple page request with or without a query string, it will be a GET.  If you submit a form, it can be a GET or a POST.  POST is required to upload files and POST can upload more data than GET is allowed to.  HEAD just returns info about the page.  If your ASPX page uses VIEWSTATE, it will always use POST because the whole page is a form with the method="post".

    All the rest of the 'verbs' require handlers and permissions on the web server.  Mostly because they are 'dangerous' because they can overwrite and delete files.  WEBDAV, used in FrontPage and some other programs, uses PUT and DELETE but requires a login.  On publicly exposed web servers, unused verbs are normally removed or blocked.

    Author Comment

    Thanks for your clarification, but still I am not understand properly, can you  please provide me the code for each method, so that i can understand clearly.
    LVL 82

    Accepted Solution

    You already have the code you need.  GET is to load a new page and POST is to submit a form.  Unless you are doing systems programming, you don't need any of the others.  It is unlikely that you will be allowed to use them in normal web programming.

    Author Closing Comment

    Thank you very much..
    LVL 82

    Expert Comment

    by:Dave Baldwin
    You're welcome.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
    Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now