Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to get data from url on asp.net

I want to get data from a url on asp.net. I need the data to be a string, which I can then use in other code.

http://example.com/service_name/videos/?category={0}&offset={1}&maxResult={2}

I need category offset and maxresult's number.

Can anyone help me?

like image 500
muhammedkasva Avatar asked Dec 10 '22 06:12

muhammedkasva


2 Answers

string category = Request.QueryString["category"];
string maxResult = Request.QueryString["maxResult"];
like image 176
Kimtho6 Avatar answered Dec 20 '22 13:12

Kimtho6


ASP.NET QueryString Usage

like image 27
Shoban Avatar answered Dec 20 '22 13:12

Shoban