This seems like it should be so simple, but is proving to be more difficult than I thought. Maybe I'm overanalyzing the problem. What I need to do is grab the referring URL, look for a specific word in that URL, then perform some actions based on those results.
For some reason, my code is not grabbing the proper word because it has ".aspx" tacked on to the end of it, so for example it's finding "Freshman.aspx" instead of just "Freshman" and then it's not processing the code properly. What can I do to fix that?
if (HttpContext.Current.Request.UrlReferrer != null)
string itmReferrer = HttpContext.Current.Request.UrlReferrer.ToString();
words = itmReferrer.Split('/');
lblReferrer.Text = itmReferrer;
foreach (string word in words)
rblProgram.SelectedValue = "UG";
lblPageTitle.Text = "Freshman Application";
bla bla bla