views:

144

answers:

1

Hey everyone,

I currently have a little form with a silverlight bit for a person to sign their name and I was wondering if there was a way to have the submit button post to the controller and a silverlight code behind action... I tried adding a dom event to fire silverlight code but I guess that doesn't fire both events...

Any ideas?

A: 

You can have Silverlight make calls back out to the DOM:

Calling Javascript functions from Silverlight (Example is Silverlight 2)

Using that method, you can have your Silverlight app complete its logic and then call back in to the page to complete the page postback logic.

Justin Niessner
yes this is what I was doing, but having both actions exist in the same button seems to be problematic
Jimmy
do you have any idea how to delay the postback from a button while the silverlight finishes its routine and then pass it back to the MVC?
Jimmy
for example i have a method which is supposed to be fired when this button is clicked but the outcome is not visible(a simple txt file on my C drive) so it is opting to hit the mvc event and not my silverlight event
Jimmy