locked
Pass QueryString as POST RRS feed

  • Question

  • Hey all,

    Is there anyway to pass the querystring from silverlight as "POST" method?

    I dont want to show it to the users in the address bar

    Any suggestion ?

    Saturday, March 27, 2010 7:37 AM

Answers

All replies

  • Hi Neal,

    Are you talking about passing value between silverlight navigation pages? If this is the case, in my opinion, "POST" is not a good solution because all silverlight pages are running on the client side, "POST" means that we need to reload the aspx page or htm page which holds the silverlight application, which is unnecessary. If you want to hide the query string from user, you can consider using a static variable in App level to hold the value or using IsolatedStorage to hold it.

    Please correct me if I misunderstand you, thanks.

    Sunday, March 28, 2010 9:08 PM
  • Frank, Sorry for not expaining the question in detail.

    My objective is to Open a file in a new browser window. To achieve this, what I have tried is created a new aspx page that opens the file. Silverlight application calls the redirect method to open this page;

    See the Silveright method

    string reportUrl = RitsHelper.GetApplicationUrl("../Reports/MyDoc.doc");

    string printReportUrl = "PrintReport.aspx?FileUrl=" + reportUrl;

    Uri sourceUri = new Uri(HtmlPage.Document.DocumentUri, printReportUrl);

    HtmlPage.Window.Navigate(sourceUri, "_blank");

    Here I have a FileUrl which is the querystring. I dont want to show the query string to the user.

    (Another example is redirecting from Login page to Home page, where userid and password will be the querystring - In this case, There will be two dirrerent XAP files)

    Sunday, March 28, 2010 11:07 PM
  • Hi neal,

    Please take a look at this similar post and see if it helps:

    http://forums.silverlight.net/forums/p/122264/275953.aspx

    Wednesday, March 31, 2010 12:59 AM