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

K

Ken Varn

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
-----------------------------------
 
K

Ken Varn

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,608
Members
45,247
Latest member
crypto tax software1

Latest Threads

Top