asp.net C# parameter question

  • Thread starter Thread starter Eric van der Niet
  • Start date Start date
E

Eric van der Niet

Hello,

I am calling a Webform the following way:
http://<server>/<directory>/webform1.aspx?oType=1090&oId={ACF1BBA5-9002-4B36-8136-46C3687636D8}

As you can see i am sending a guid parameter to the form... but now the
question: In the webform how do i get the second parameter out of the
calling url using asp.net or c#.net.... Any suggestions welcome!!
help!

Eric van der Niet
 
Use the QueryString property of the HttpResponse object available through
System.Web.UI.Page, which you are inheriting:
base.Response.Write(
base.Request.QueryString ["oId"]
);

The QueryString property(NameValueCollection) can be used to read any query
string parameter.
 
string oType = Request.Querystring["oType"].ToString();

Something like that.

Lowell
 
Back
Top