Hi, my name is Harold Javier. I am an ASP.NET (dotNet) trainer, coach, mentor, and consultant for more than 8 years. It is my mission to teach, educate, and train people about some simple solutions to common problems we experience either as a software developer or as a researcher on topics about ASP.NET Core, ASP.NET MVC, ASP.NET Web API, ASP.NET Web Form, and .NET (dotNet) technology in general.
08 May 2017
How Do We Get The Parameter Value from a URL?
Here's a quick and easy way to read and display the paramater value from a URL.
Ex:
var sampleUri = new Uri("http://www.mysite.com/default.aspx?ID=21");
string getParam = HttpUtility.ParseQueryString(sampleUri.Query).Get("ID");
No comments:
Post a Comment