Create Silverlight application in Blend then migrate to Visual Studio - asp.net-mvc

I want to make a Silverlight application in Expression Blend because of the rich UI and navigation of Blend. But I want to store the Silverlight application in an ASP.NET MVC web project. When I try to make a new Silverlight application, the default web application is an ASP.NET Web application (or web site, if I'm wrong). Can I make a single Silverlight application (no web project) then import in an ASP.NET MVC application? How can I do this?

Yes, you can.
Create your Silverlight application without the web project.
Add asp.net mvc project to the current solution.
Go to the properties of you asp.net mvc project
Select the Silverlight Application tab, click the Add button, and select the Silverlight project in the solution. Also specifiy the destination folder (in the asp.net mvc) where you want to place xap file.
Create the view for you silverlight application.
Reference your silvelight applicatition in the view. For example:
Code:
<object type="application/x-silverlight-2"
data="data:application/x-silverlight,"
width="100%" height="100%">
<param name="source" value="/ClientBin/MySlApp.xap"/>
<param name="onError" value="onSilverlightError" />
</object>
That's it...
Cheers

Related

MVC project and webforms

I have an MVC project and I want to add a webform to it and integrate it with the MVC theme. The web form always runs in a new page not showing the menu.

How to add new aspx page in asp.net 5 application

I have created a new ASP.Net 5 application as empty and tried to add the aspx page through add new item. but there is no options to add aspx page rather that we can have all other items like view, controller, class library.
Any suggestion is greatly appreciated.
Thanks in advance.
Files ending in .aspx are part of the Web Forms framework. ASP.NET 5 does not support Web Forms at all, nor will it ever support Web Forms. If you want to create a Web Forms application using Visual Studio 2015, you should choose Web Forms from the ASP.NET 4.6 Templates instead.
ASP.Net 5 is like ASP.Net MVC, you cannot add .aspx page but .cshtml razor view into your Views folder.
ASP.NET 5 support both MVC and webfrom. We have choose web application templet with Web Form, MVC or API.
https://docs.asp.net/en/latest/tutorials/your-first-aspnet-application.html

WebBrowser inside Asp.net mvc website

I have an asp.net mvc website and inside a page, I would like to have a WebBrowser to browse other sites.
Is it possible ? OR at least to display a single external Webpage without leaving my page...
If yes, what is the best way to do it ?
ASP.NET MVC is an Web Project. not a native Application.
If you want to insert a WebBrowser, use Iframe tag in view page.
<iframe src="http://somewebsite.com/path/to/show" width="100" height="100"></iframe>

Calling an ASP.NET webform page from ASP.NET MVC application within the same Project Solution

I have 2 projects within the same Visual Studio Solution.
One is an ASP.NET MVC Project and the other is an ASP.NET Web Application (Webforms).
I want to call the ASP.NET Web Application from the MVC instead of having to re-write the whole web application in MVC.
You could use an anchor:
<a href="http://address_of_the_application_that_you_dont_want_to_rewrite">
Go to the WebForms application
</a>
or an iframe:
<iframe src="http://address_of_the_application_that_you_dont_want_to_rewrite" />

Use silverlight in asp.net MVC

Is it possible? I'm not familiar with silverlight architecture, but i know about wpf and asp.net mvc. is it possible to replace mvc view page with silverlight ones?
You can't replace an MVC view page with a silverlight one. But you can embed a silverlight app in one.

Resources