如何在 Expression Blend 中为 MVC 项目设置启动页面?
我们在 ASP.NET MVC 视图中托管 Silverlight 应用程序。我们没有可以选择作为启动的 aspx 或 html 页面 - 我们需要使用 URL 启动应用程序。
看来 Expression Blend 不允许这种启动配置 - 您必须选择特定页面。因此,您无法从 Expression Blend 启动/调试应用程序 - 它抱怨启动页面未设置。
是否有解决方案/解决方法允许我们从 Blend 启动 ASP.NET MVC 托管的 Silverlight 应用程序?
We are hosting a Silverlight application inside an ASP.NET MVC view. There isn't an aspx or an html page that we can choose as the startup - we need to launch the application using a URL.
It seems that Expression Blend doesn't allow this startup configuration - you must choose a specific page. As a result you can't start/debug the application from Expression Blend - it complains about startup page not being set.
Is there a solution/workaround that would allow us to start an ASP.NET MVC-hosted Silverlight application from Blend?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我一直在做的是创建一个 URL 路由(在 ASP MVC Global.asax.cs 中)来捕获 Silverlight 应用程序试图访问的任何页面。它应该点击控制器并返回显示 silverlight 应用程序的视图(假设路由设置正确),而不是返回 .aspx 页面或 404。
例如,
编辑:虽然抱歉,但我想这无助于解决能够从 Expression Blend 运行项目的问题。我不是 Blend 的忠实粉丝,我不知道他们为什么不将 Blend 的一些功能合并到 Visual Studio 中。 Visual Studio 的 XAML 编辑器比 Blend 好得多。
What I have been doing, is to create a URL route (in your ASP MVC Global.asax.cs) that catches whatever page your Silverlight application is trying to hit. Instead of returning that .aspx page or a 404, it should hit the controller and return your view that displays the silverlight app (assuming the route is set up correctly).
For example,
EDIT: although sorry, I guess this doesn't help the issue of being able to run the project from Expression Blend. I'm not a big fan of blend, I don't know why they didn't jsut incorporate some of the features from Blend into Visual Studio. Visual Studio's XAML editor is much better than blend.