I have an application page that opens a modal dialog. Users are provided a link to this modal dialog via email, when they click on the link it will take them to the modal dialog and populate the controls directly from values stored in the query string (it is important to note the parameter values of the querystring can be different, and are usually never the same). When I attempt to obtain the querystring parameters in the code-behind of the modal dialog, the only parameter that is returned is IsDlg. I need to be able to get the querystring parameters that were initially sent before the modal dialog appeared, within the code-behind of the modal dialog.

Is this possible (preferably in C# and not JavaScript). Thank you

1 Answer 1


Found the answer (quite simply using the IntelliSense Visual Studio). Here is what I did:

System.Collections.Specialized.NameValueCollection paramCollection = HttpUtility.ParseQueryString(this.Request.UrlReferrer.AbsoluteUri);
string param = paramCollection["param"].Replace("|", @"\");

It worked!!

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.