2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by smandeh
0

A user is sending me a data value in a web browser -see below for example. I would like to get this value and use it downstream. I try using string val = Request.QueryString[X_ACCOUNTID] but it did not work. Any idea on how I can retrieve the value in my ASP code behind?

http://SERVERNAME/TEST/MYTEST.aspx?X_ACCOUNTID=123

Here is the Solution:

string val;
if(Request.QueryString.Count>0)
{
  val= Request.QueryString["X_ACCOUNTID"];
}

Edited by murugavel84: n/a

0

Here is the Solution:

string val;
if(Request.QueryString.Count>0)
{
  val= Request.QueryString["X_ACCOUNTID"];
}

Although I can see the X_ACCOUNTID value in the url, it is empty when I try to access it. In fact the entire url is missing when in debug mode in Page_Load. Any idea why the url is missing although I can see it in the address bar?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.