Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

best class for building urls?

Status
Not open for further replies.

OhioSteve

MIS
Mar 12, 2002
1,352
US
Frequently I need to create url strings. To complete this task, I want to use a class that builds urls. If necessary, I could write the class.

Does vb.net 2.0 have any objects like "urlbuilder" or "querystringbuilder"?? I do not want to reinvent the wheel.
 
Nothing that I know of, although System.Text.StringBuilder might suit your needs.

If not, the class should be fairly simple. You might end up with 2 classes (or a structure)--one to contain the setting for the base URL and the list of parameter objects (the other class) which would contain the parameter name and value. Then, you can override the ToString function to return your complete URL.
 
You might looks at System.Web.UI.Design.UrlBuilder

It might meet you needs.

=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)

Robert L. Johnson III
CCNA, CCDA, MCSA, CNA, Net+, A+, CHDP
VB.NET Programmer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top