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 6531485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:53:01+00:00 2026-05-25T09:53:01+00:00

In an ASP.NET MVC3 application I have a function that looks like: Public Sub

  • 0

In an ASP.NET MVC3 application I have a function that looks like:

Public Sub DoSomething(controllerCtx As ControllerContext)
    ....

    ' Which to use? and Why?
    Dim val = controllerCtx.HttpContext.Request.Params.Item("someKey")
    Dim val = controllerCtx.HttpContext.Request.Item("someKey")

    ....
End Sub

(I’m aware that Item is a Default property in both and can be removed, that’s not relevant in this question.)

Looking at the MSDN pages for Request.Item and Params.Item, I’m not seeing any differences. Both pages say they get values from: Cookies, Form, QueryString, or ServerVariables collections. (though they do list the orders differently.)

I’ve seen this Stack Overflow post, but it seems the answers focused on the QueryString component moreso than the Request.Params.Item vs Request.Item.

Why would would I use one over the other? Is there any difference between the two at all?

  • 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-25T09:53:01+00:00Added an answer on May 25, 2026 at 9:53 am

    The two are strictly equivalent in terms of contents. And here’s the contents and the order in which it is searched:

    1. QueryString
    2. Form
    3. Cookies
    4. ServerVariables

    As far as which one to use, well, in an ASP.NET MVC application it would be better to use:

    controllerCtx.Controller.ValueProvider.GetValue("someKey");
    

    as this take into account routes and custom value providers (such as for example the JsonValueProvider) as well. But of course everything would depend on your scenario and specific requirements.

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

Sidebar

Related Questions

My application is in Asp.Net MVC3 coded in C#.Net. I have Views which contains
I have a Razor view in my asp.net MVC3 application with a dropdownlist like
I have an ASP.NET MVC3 application in which I am creating multiple areas, is
I have a JavaScript function like this in my ASP.NET MVC 3 application. function
In my ASP.NET MVC3 application I have the following method that use EF entities
I have to develop an ASP.NET MVC3 application in C# and Razor that has
I have an ASP.NET MVC3 application in C# and Razor. In the view MyView
I am building an asp.net mvc3 application and I have decided to use areas
Here's the issue at hand: I have developed an ASP.NET MVC3 application using Razor.
I am working on an asp.net mvc3 application with linq2sql. I have a List

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.