3

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

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
George2
  • 44,761
  • 110
  • 317
  • 455

2 Answers2

3

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
  • 3,224
  • 3
  • 27
  • 34
2

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

Can Silverlight initiate Page Refreshes?

Community
  • 1
  • 1
Erik Mork
  • 1,443
  • 9
  • 10