当前位置: 动力学知识库 > 问答 > 编程问答 >

c# - How to migrate from ASP.NET to Silverlight?

问题描述:

I currently have a C# ASP.NET web forms web application that is maybe 2% Silverlight (4 or 5 xaml views). Our team has decided that for the next version we need to use Silverlight more for video streaming as well as CRUD operations. We have a Silverlight project and a single xap file to compliment the ASP.NET site. I would like to start using Silverlight for all new views and slowly convert existing aspx views over to Silverlight. The way we currently load the Silverlight views is by passing in a view name as a property like so:

 <div id="silverlightControlHost">

<object data="data:application/x-silverlight-2,"

type="application/x-silverlight-2" width="100%" height="100%">

<param name="source" value="ClientBin/Superuser.xap"/>

<param name="onError" value="onSilverlightError" />

<param name="background" value="white" />

<param name="minRuntimeVersion" value="4.0.50826.0" />

<param name="autoUpgrade" value="true" />

<param name="initParams" value="startPage=AQ" />

<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></div>

By using: <param name="initParams" value="startPage=AQ" /> (AQ.xaml) I can load any view I want. Is this a good strategy to use for migrating? What is a better way to do this?

Thanks!

网友答案:

Learn more about Prism and Unity for Silverlight it's realy great thing when you need create internet application Prism and Mike Taulty Video Series Prevent me from reinventing and save a lot of time.

分享给朋友:
您可能感兴趣的文章:
随机阅读: