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#.

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & Iโ€™ll get back to you as soon as possible.

Method 1

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.

Method 2

I think youโ€™re looking for HtmlPage.Document.Submit() .

Can Silverlight initiate Page Refreshes?


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x