IrfanRaza
IrfanRaza

Reputation: 3058

webpage and silverlight application communication

My problem is normal issue that may be faced by every developer.

I have a web application developed with ASP.NET MVC2. I have also created a Silverlight 4 application. The View in web application embeds the silverlight application as shown below -

<div id="silverlightControlHost">
        <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
          <param name="source" value="../../ClientBin/OmCodeEditor.xap"/>
          <param name="onError" value="onSilverlightError" />
          <param name="background" value="white" />
          <param name="minRuntimeVersion" value="4.0.50826.0" />
          <param name="autoUpgrade" value="true" />
          <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.50826.0" style="text-decoration:none">
              <img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/>
          </a>
        </object><iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe>

The silverlight application gets some text in textbox which i need in View of my web application.

Any help is greatly appreciated.

Thanks for sharing your valuable time.

Upvotes: 0

Views: 90

Answers (1)

Muthu
Muthu

Reputation: 2685

  1. Create a Silverlight enabled web service
  2. Reference the web service in your silverlight project and use it.

There are number of tutorials at http://www.silverlight.net,which you might find useful.

Upvotes: 1

Related Questions