Difference between Request("X") and Request.Param("X") in ASP / ASP.NET !!

Posted on 2007-10-14
Last Modified: 2012-06-27

Can you please let me know what is the difference between

Request("X") and Request.Param("X")

I think so this is a basic question in classical ASP or ASP.NET but need some good explanation. Appreciate your time and patience !!

Question by:kishore_peddi
    LVL 20

    Expert Comment

    Request("X") = will accept irrespective of form method get /post
    Request.Param("X") is only for post method.


    Author Comment

    Then...Can you please explain me what is the difference between

    Request.Form("X")   and   Request.Param("X")  =>  as both are  only for post method .... Am i correct ? Please correct me if i am wrong !!
    LVL 96

    Accepted Solution

    Put simply, Params is a combination of QueryString, Form, ServerVariables, and Cookies items, while Form is just the form variables.  In the example you showed, there realistically isn't any difference, but there can be Params values that are not in the Form collection.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
    Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    779 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

    20 Experts available now in Live!

    Get 1:1 Help Now