Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / VB.NET / December 2005

Tip: Looking for answers? Try searching our database.

Query type string parsing

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
tshad - 20 Dec 2005 23:04 GMT
Is there an easy way to parse a string that is set up like a query string?

I have a string that I normally send in the query string to another page,
but I would also like to take the same string a parse it directly.

Thanks,

Tom
Herfried K. Wagner [MVP] - 20 Dec 2005 23:14 GMT
"tshad" <tscheiderich@ftsolutions.com> schrieb:
> Is there an easy way to parse a string that is set up like a query string?

Quick and dirty:

\\\
Dim u As New Uri("http://www.example.org/index?a=bla&b=22312")
Dim w As New HttpRequest("", u.AbsoluteUri, Mid(u.Query, 2))
MsgBox(w.QueryString.Item("a"))
MsgBox(w.QueryString.Item("b"))
///

Signature

M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>

tshad - 20 Dec 2005 23:40 GMT
> "tshad" <tscheiderich@ftsolutions.com> schrieb:
>> Is there an easy way to parse a string that is set up like a query
[quoted text clipped - 8 lines]
> MsgBox(w.QueryString.Item("b"))
> ///

That works.

I was hoping to be able to just parse the query string part of it.  But if I
add http://a in front of the string it works fine.

Thanks,

Tom

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.