.net - Is there any difference between Request("key") and Request.Params("key")? -


In the ASP.NET MVC3 application, I have a function that looks like:
  public sub-doSomething (controller CTX as controller context) .... 'Which to use? And why? Dim val = controllerCtx.HttpContext.Request.Params.Item ("SomeKey") Modulate Val = Controller CTX.HttpContext.Request.Item ("SomeKey") .... End Sub   

( I know that the item is in both a default property and can be removed, which is not relevant in this question. )

The MSDN page is looking for it and I do not see any difference, both pages say that they get value: Cookies, Forms, Query String, or Server Denial Storage. (Although they list different commands.)

I have seen, but it seems that the answer focused more than request on query string . Parameters.it vs. request. Item .

Why would I use one on another? Is there a difference between the two?

Both materials are strictly in relation to

  • cookies
  • As far as one is used, okay, in an asp.net mvc application It would be better to use:

      controller CTx.Controller.ValueProvider.GetValue ("someKey");   

    Because this account takes well for routes and custom value providers (such as for example JasonWolverware). But of course everything will depend on your landscape and specific needs.

  • Comments

    Popular posts from this blog

    mysql - BLOB/TEXT column 'value' used in key specification without a key length -

    c# - Using Vici cool Storage with monodroid -

    python - referencing a variable in another function? -