views:

2004

answers:

2

Hello everyone,

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

thanks in advance, George

+2  A: 

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.

JustLoren
Cool, reply! Tnanks.
George2
+2  A: 

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

http://stackoverflow.com/questions/552756/can-silverlight-initiate-page-refreshes

Erik Mork