locked
Intergrate SL in Asp.net Page RRS feed

  • Question

  • Hi

    I have Created an asp.net application(C#) and i want to add some controls of Silverlight in Asp.net Application is it possible , if it is possoble than how.................?

    Saturday, October 29, 2011 8:18 AM

Answers

  • Hi,Silverlight just like flash , a web browser plugin:

     
    <div id="silverlightControlHost">
            <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
    		  <param name="source" value="ClientBin/SilverlightApplication1.xap"/>
    		  <param name="onError" value="onSilverlightError" />
    		  <param name="background" value="white" />
    		  <param name="minRuntimeVersion" value="5.0.60818.0" />
    		  <param name="autoUpgrade" value="true" />
    		  <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=5.0.60818.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></div>

     

    You can add silverlight in this way(just in a div).

     

    Monday, October 31, 2011 1:38 AM
  • Would you Like to send me an example plz .............?

    There's two ways to integrate Silverlight with a web page, and it's documented with examples in the documentation:  Integrating Silverlight with a Web Page

    Friday, November 4, 2011 11:50 AM

All replies

  • here's two video's that explain it all. you include an html object in your asp.net page.

    http://www.microsoft.com/expression/resources/blendtraining/Day.aspx?day=4

    Saturday, October 29, 2011 9:19 AM
  • Hi,Silverlight just like flash , a web browser plugin:

     
    <div id="silverlightControlHost">
            <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
    		  <param name="source" value="ClientBin/SilverlightApplication1.xap"/>
    		  <param name="onError" value="onSilverlightError" />
    		  <param name="background" value="white" />
    		  <param name="minRuntimeVersion" value="5.0.60818.0" />
    		  <param name="autoUpgrade" value="true" />
    		  <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=5.0.60818.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></div>

     

    You can add silverlight in this way(just in a div).

     

    Monday, October 31, 2011 1:38 AM
  • Silverlight Controls can not be add to asp.net page directly, you should create Silverlight project first, and then load the .xap file in your asp.net page.

    try to create a Silverlight project, and then you know how.

    Friday, November 4, 2011 3:56 AM
  • hi

    Would you Like to send me an example plz .............?

    Friday, November 4, 2011 7:08 AM
  • Would you Like to send me an example plz .............?

    There's two ways to integrate Silverlight with a web page, and it's documented with examples in the documentation:  Integrating Silverlight with a Web Page

    Friday, November 4, 2011 11:50 AM