How to get path argument info?

Discussion in 'ASP .Net' started by Rob R. Ainscough, Jun 21, 2005.

  1. How can I extract the path argument info in ASP.NET (using VB.NET)?

    Examples

    my Main.aspx form is linked using "Main.aspx?CallFrom=MyApp"

    I want to be able to extract the name/value pair "CallFrom=MyApp" from
    within my Main.aspx?

    Is this possible?

    Thanks, Rob.
    Rob R. Ainscough, Jun 21, 2005
    #1
    1. Advertising

  2. its called a querystring value

    http://samples.gotdotnet.com/quickstart/aspplus/doc/syntaxandsemantics.aspx

    --
    Regards

    John Timney
    ASP.NET MVP
    Microsoft Regional Director

    "Rob R. Ainscough" <> wrote in message
    news:...
    > How can I extract the path argument info in ASP.NET (using VB.NET)?
    >
    > Examples
    >
    > my Main.aspx form is linked using "Main.aspx?CallFrom=MyApp"
    >
    > I want to be able to extract the name/value pair "CallFrom=MyApp" from
    > within my Main.aspx?
    >
    > Is this possible?
    >
    > Thanks, Rob.
    >
    John Timney \(ASP.NET MVP\), Jun 21, 2005
    #2
    1. Advertising

  3. I think you want just Request.QueryString("CallFrom")...

    But if you wanted the entire collection for some other reason, the
    entire string is a NameValueCollection object, and you can loop through
    it like you would a HashTable and get values based on keys.

    Something like this (C#):
    System.Collections.Specialized.NameValueCollection objQS = new
    System.Collections.Specialized.NameValueCollection();

    objQS = Request.QueryString;

    for (int ctr = 0; ctr < objQS.Count; ctr++)
    {
    Response.Write("key: " + objQS.GetKey(ctr).ToString() + "<br>");
    Response.Write("value: " + objQS.Get(ctr).ToString() + "<br><br>");
    }

    Hope that helps.


    Rob R. Ainscough wrote:
    > How can I extract the path argument info in ASP.NET (using VB.NET)?
    >
    > Examples
    >
    > my Main.aspx form is linked using "Main.aspx?CallFrom=MyApp"
    >
    > I want to be able to extract the name/value pair "CallFrom=MyApp" from
    > within my Main.aspx?
    >
    > Is this possible?
    >
    > Thanks, Rob.
    >
    >
    Elliot M. Rodriguez, Jun 21, 2005
    #3
  4. Rob R. Ainscough

    Bruce Barker Guest

    look at the Request.QueryString

    -- bruce (sqlwork.com)


    "Rob R. Ainscough" <> wrote in message
    news:...
    > How can I extract the path argument info in ASP.NET (using VB.NET)?
    >
    > Examples
    >
    > my Main.aspx form is linked using "Main.aspx?CallFrom=MyApp"
    >
    > I want to be able to extract the name/value pair "CallFrom=MyApp" from
    > within my Main.aspx?
    >
    > Is this possible?
    >
    > Thanks, Rob.
    >
    Bruce Barker, Jun 21, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Vasanth
    Replies:
    0
    Views:
    529
    Vasanth
    Jun 28, 2004
  2. Mupota Muchelemba
    Replies:
    1
    Views:
    897
    Tony Morris
    Feb 4, 2004
  3. vansky
    Replies:
    9
    Views:
    981
    vansky
    Jan 14, 2006
  4. =?Utf-8?B?ZGF2aWQ=?=
    Replies:
    0
    Views:
    345
    =?Utf-8?B?ZGF2aWQ=?=
    Mar 5, 2007
  5. ilya

    get CPU info, RAM info

    ilya, Apr 8, 2010, in forum: Java
    Replies:
    43
    Views:
    5,930
    Mike Schilling
    Apr 19, 2010
Loading...

Share This Page