net_susan
asked on
QueryString C# Code
How do I change the code below so that my querystring can be captured from anywhere in the URL (it will always be preceded with an & (ampersand).
It might be something like:
http://someurl/somefile.aspx?source=somepage.aspx&oneqs=4&anotherqs=Susan%20Smith
It might be something like:
http://someurl/somefile.aspx?source=somepage.aspx&oneqs=4&anotherqs=Susan%20Smith
string[] split = Request.Url.ToString().Split(new char[] {'/'}, System.StringSplitOptions.None);
string endsWith = split[split.Length - 1].ToLower();
endsWith = (endsWith.Split(new char[] {'?'}, System.StringSplitOptions.None))[0];
switch (endsWith)
{
case "Susan Smith": BranchApp = "Susan Smith"; break;
}
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER