Reputation: 491
Im trying to grab the LOC=URL from the following href
http://url.comclickThrough?SRC=&target=SP&PN=1&FP=listings&T=Las+Vegas&S=NV&C=lawyer&PGID=yp604.8084.1349604581940.36701144470449&ALG=113&TS=nbt&OF=1&ACTION=log,red&CID=520623&LID=2325743402&TR=77&bidType=FLCLIK&relativePosition=3&position=33&PGSN=R1&RS=49.157852&CID=520623&FL=url&TL=off&LOC=http://www.nvtalaw.com
How can i get the last URL in the href?
Upvotes: 1
Views: 295
Reputation: 57640
Dont know about html-agility-pack but it can be parsed by using System.Web.HttpUtility class
System.Uri u = new System.Uri(url);
string LOC = System.Web.HttpUtility.ParseQueryString(u.Query).Get("LOC");
Upvotes: 2