Is there a class or method to construct url args or extract url args?

Discussion in 'ASP .Net' started by Ken Varn, Jun 21, 2005.

  1. Ken Varn

    Ken Varn Guest

    Is there any class method that can build a url with command args? I know
    that I can do it by hand, but I would like to do it with a collection of
    name/value types like the Style and Attributes properties for Controls.

    I.e., Instead of
    Page.Response.Redirect("SomeUrl.aspx?Arg1='a'&Arg2='b'&Arg3='c'");

    I would rather use something like this:

    URLWithArgs Url = new URLWithArgs();

    Url.Params.Add("Arg1","a"); etc.....

    Page.Response.Redirect(Url.String);

    Is there anything like this available? I have not found it, and was
    avoiding building it myself since it seems like it is an obvious method that
    one would use to do this and seems like it should be a standard call
    somewhere.


    --
    -----------------------------------
    Ken Varn
    Senior Software Engineer
    Diebold Inc.

    EmailID = varnk
    Domain = Diebold.com
    -----------------------------------
    Ken Varn, Jun 21, 2005
    #1
    1. Advertising

  2. Ken Varn

    Guest

    , Jun 21, 2005
    #2
    1. Advertising

  3. Ken Varn

    Ken Varn Guest

    Thanks!

    I am really surprised that this is not already built into the .NET
    framework.

    --
    -----------------------------------
    Ken Varn
    Senior Software Engineer
    Diebold Inc.

    EmailID = varnk
    Domain = Diebold.com
    -----------------------------------
    <> wrote in message
    news:...
    > A small Class for simplifying the Work with URL Parameters :
    >
    > http://www.codeproject.com/aspnet/SimpleQueryString.asp
    >
    > Let me know if you have any more questions..
    >
    > Cheers,
    > Tom Pester
    >
    >
    Ken Varn, Jun 22, 2005
    #3
    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. Eric Lilja
    Replies:
    0
    Views:
    323
    Eric Lilja
    Feb 23, 2005
  2. Replies:
    3
    Views:
    474
    David Eppstein
    Sep 17, 2003
  3. Pierre Fortin

    args v. *args passed to: os.path.join()

    Pierre Fortin, Sep 18, 2004, in forum: Python
    Replies:
    2
    Views:
    659
    Pierre Fortin
    Sep 18, 2004
  4. Mukesh
    Replies:
    4
    Views:
    601
    Paul N
    Mar 26, 2010
  5. er
    Replies:
    2
    Views:
    480
Loading...

Share This Page