简体   繁体   中英

redirect to another page from Silverlight

In side a Silverlight Page, I want to redirect to another aspx page in the same web site and using POST method to send some additional header information. Any ideas how to implement this? Any samples are appreciated. :-)

I am using VSTS2008 + .Net 3.5 + Silverlight 2.0 + C#.

My suggestion would be to have a Visibility=hidden Button on the page, and then use javascript to retrieve it and .Click() it. Thus you get to do a post without all the work that this guy went through: http://mentaljetsam.wordpress.com/2008/06/02/using-javascript-to-post-data-between-pages/

Especially considering it's a bear to craft a POST-to-ASP.NET through javascript, as ASP.NET requires pesky things like viewstate etc.

I think you're looking for HtmlPage.Document.Submit() .

Can Silverlight initiate Page Refreshes?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM