如何在asp.net Web应用程序中托管多个Silverlight用户控件 [英] how to host more than one silverlight user controls in asp.net web application

查看:99
本文介绍了如何在asp.net Web应用程序中托管多个Silverlight用户控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我正在Visual Studio 2010中创建一个asp.net网站应用程序.我在我的项目中添加了一个silverlight应用程序.它具有一个用户控件mainpage.xaml.将每个Silverlight应用程序添加到asp.net项目中时,都会在testpage.xap上创建该文件,可用于在我们的网页中添加该控件.当我在同一个Silverlight应用程序中添加另一个用户控件时,它不会创建第二个测试页,那么如何在网页中使用该控件?是真的,我们只能在一个Silverlight应用程序中创建一个Silverlight控件.

一个Silverlight应用程序只有一个用户控件和一个测试页.因此,要添加另一个Silverlight用户控件,我必须创建另一个应用程序和另一个测试页.但是还有另一种方法吗?

Hi everyone,
i am creating an asp.net web site application in visual studio 2010. i have added one silverlight application in my project. it has one user control mainpage.xaml. Every silverlight application when added in asp.net project creates on testpage.xap which can be used for adding that control in our web page. when i add another user control in the same silverlight application, it doesnt create second testpage, so how can i use that control in web page? is it true that we can create only one silverlight control in one silverlight application.??


There exists only single user control and single test page for one silverlight application. So for adding another silverlight user control, i have to create another application and another test page. but is there another way to do it???

推荐答案

Silverlight被实现为浏览器插件,并按如下所述添加到网页中:将Silverlight与网页集成 [
Silverlight is implemented as a browser plugin and is added to a web page as described here: Integrating Silverlight with a Web Page[^]

If you have more than one Silverlight application then you can integrate them with your web pages the same way. The .xap file name and/or URI will be different but that''s it.

Your text doesn''t make sense - adding a user control to a Silverlight application has nothing to do with the web page the Silverlight application is hosted on so you can''t expect another test page.


这篇关于如何在asp.net Web应用程序中托管多个Silverlight用户控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆