c# - How do I change the value of a query string parameter? -
i have string representation of url this:
http://www.goodstuff.xxx/services/stu/query?where=1%3d1&text=&objectids=231699%2c232002%2c231700%2c100646&time=
it's url string object in code. how change value of objectids
? need find string, objectids
, locate &
before , after, , replace contents desired value? or there better way?
this .net 4.5 fw console app...
if rest of url fixed, locate id manually, , use string.format
, string.join
insert ids it:
var urlstring = string.format( "http://www.goodstuff.xxx/services/stu/query?where=1%3d1&text=&objectids={0}&time=" , string.join("%", ids) );
this insert %
-separated list of ids
code url template.
Comments
Post a Comment