How to integrate silverlight into aspx? Please explain -


i have created silverlight application want embed aspx page. there video tutorial this, explains how integrate silverlight in aspx page?

<head> <title>ayarlarslv</title> <style type="text/css"> html, body {     height: 100%;     overflow: auto; } body {     padding: 0;     margin: 0; } #silverlightcontrolhost {     height: 100%;     text-align:center; } </style> <script type="text/javascript" src="silverlight.js"></script>  <script type="text/javascript">     function onsilverlighterror(sender, args) {         var appsource = "";         if (sender != null && sender != 0) {           appsource = sender.gethost().source;         }          var errortype = args.errortype;         var ierrorcode = args.errorcode;          if (errortype == "imageerror" || errortype == "mediaerror") {           return;         }          var errmsg = "unhandled error in silverlight application " +  appsource + "\n" ;          errmsg += "code: "+ ierrorcode + "    \n";         errmsg += "category: " + errortype + "       \n";         errmsg += "message: " + args.errormessage + "     \n";          if (errortype == "parsererror") {             errmsg += "file: " + args.xamlfile + "     \n";             errmsg += "line: " + args.linenumber + "     \n";             errmsg += "position: " + args.charposition + "     \n";         }         else if (errortype == "runtimeerror") {                        if (args.linenumber != 0) {                 errmsg += "line: " + args.linenumber + "     \n";                 errmsg += "position: " +  args.charposition + "     \n";             }             errmsg += "methodname: " + args.methodname + "     \n";         }          throw new error(errmsg);     } </script> 

silverlight portion :

<form id="form1" runat="server" style="height:100%"> <div id="silverlightcontrolhost">     <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">       <param name="source" value="clientbin/silverlight.xap"/>       <param name="onerror" value="onsilverlighterror" />       <param name="background" value="white" />       <param name="minruntimeversion" value="5.0.61118.0" />       <param name="autoupgrade" value="true" />       <a href="http://go.microsoft.com/fwlink/?linkid=149156&v=5.0.61118.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> </form>  </head> 


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -