Glews Glews - 9 months ago 64
ASP.NET (C#) Question

Stored procedure parameter value from url value Webform C#?

I'm wondering if it's possible to get a parameter for a stored procedure from an URL. For example, let's say my
URL is
and I want a client to be able to enter something like
in the web browser and the site displays the stored procedure with parameter 306.

I already know how to display the data i just need the parameter value from the URL. Thank you!

Answer Source

If you are using and not MVC then you can create the URL as

You can then use Request.Querystring[ParamName].ToString() on the page load of your page to retrieve the value again.

If the data you are sending is sensitive, make sure you encrypt it first.