I have a string variable which stores the values of an URL like
"http://abc/abc_UAT/CustomerDetail.aspx?r=1".
I just need to search the character ?
and need to store all character before '?' into another string variable
I have a string variable which stores the values of an URL like
"http://abc/abc_UAT/CustomerDetail.aspx?r=1".
I just need to search the character ?
and need to store all character before '?' into another string variable
I will give you the answer even if this post is a duplicate.
You can use the Split function.
e.g. :
var before = "http://abc/abc_UAT/CustomerDetail.aspx?r=1";
var wantedString = before.Split('?')[0];