Z
Z
ZedRott2014-10-23 18:28:40
ASP.NET
ZedRott, 2014-10-23 18:28:40

How to extract data from address bar in C# (ASP.NET)?

PHP has a global $_GET array that contains variables from the address bar (I'm talking about this: example.com/index.php?id=1 ).
And what is the method for this in ASP.NET?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
aush, 2014-10-23
@aush

HttpRequest.QueryString
If you have MVC, then you specify variables as arguments to your Action and they will be substituted by the framework itself - weblogs.asp.net/shijuvarghese/querystring-values-a... .

A
Arthur Gurinovich, 2014-10-23
@ArthurGurinovich

The question is, are there any parameters in the GET line?
All parameters entered in the browser line are filled into the HttpContext.Current.Request.QueryString collection, parameter names will be filled into the HttpContext.Current.Request.QueryString.AllKeys list.
(with Author Below)
The author of the article seems to be talking about exactly what you need:
antitheft-mobile.com/blog/kak_prochitat_parametry_...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question