[SOLVED] passing url parameters |
1/23/2023 1:42:01 AM |
ASPRunner.NET General questions | |
R
Rick W author
When using a url with parameters for example: I need to access the serialno value (1234) from the url and use it in a query. It there a way to do that? |
|
![]() |
Admin 1/23/2023 |
Google phrase to search for: https://www.syncfusion.com/faq/aspnet/basic/how-to-access-the-parameters-passed-in-via-the-url |
R
|
Rick W author 1/23/2023 |
Thank you for the response - I should have explained better. What I am trying to do is access the serialno from the url and use it in my ASPRunner.NET Event page. http://asp_test.com/?serialno=1234 SELECT serialno from dbo.example Will not compile if I use Request.QueryString['serialno']; |
R
|
Rick W author 1/24/2023 |
I am using Edit Page / After Record Updated to add a History record into another table. The following code works fine: DB.Insert("dbo.component_history", data); The problem is I am trying to pass a partno through the URL: Using Using Been fighting this for a few days now but looking to confirm if I can actually do this within the event pages. |
R
|
Rick W author 1/28/2023 |
Still fighting this problem. I have a SQL Server with may part numbers. Want to access one part number by using the URL: Ideally, would put this in the WHERE statement in SQL. At a loss as to how to get the partno from the URL and use it within SQL. |
![]() |
Admin 1/29/2023 |
HttpContext.Current.Request.QueryString["partno"] is the right way to access the parameter from the URL however this is just a part of the solution.
|
R
|
Rick W author 1/29/2023 |
It worked!!! Rick |