Ok, I have a string of the form
string temp = "http://www.example.com?file=666111&submitter=Betty&origin=Office&telNo=05555";
what I need to do is extract the value of the file variable in order to use it. If this was the referrer url I could've done Request.QueryString
and got it but the problem is that I have it as a string variable.
I could try to do substring and get the value but I was hoping there was a cleaner way t开发者_运维技巧o do this?
Perhaps you can use the HttpUtility.ParseQueryString method. It returns a NameValueCollection
with all parameters.
精彩评论