1

I know I can customize the signin page in the adfs\ls folder. But inside that FormsSignIn.aspx page or master page I want to use a querystring parameter. But HttpContext.Current.Request.Querystring is empty. Any idea? What I want to achieve is to make the layout dependend on a querystring parameter or something like that.

2 Answers 2

2

Not sure why it is empty but there are other ways to do this. Off the top of my head :-)

  • Request.RawUrl
  • Request.ServerVariables["QUERY_STRING"]
  • Request.Params[""]

Does one of these work?

Sign up to request clarification or add additional context in comments.

1 Comment

RawUrl shows the url with the querystring. But ServerVariables["QUERY_STRING"] returns empty. So could decode RawUrl, but why is the querystring not provided by ASP.NET? Strange.
0

Indeed, the query string is not available using the "standard" property. I'm using this in my code:

NameValueCollection queryString = HttpUtility.ParseQueryString(Request.Url.Query);

if (queryString.AllKeys.Contains("param"))
{
    string value = queryString["param"];
}

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.