How to add silverlight project to ASP.NET project? - asp.net

I have a silverlight application project that I need to add to an ASP.NET Project. I know it can be done because you can choose to have both when you first create a silverlight project, i'm just not sure how you would do it after the fact. Any Ideas?

First of all Add a new website to your Silverlight application(if there are now ASP.NET website in your solution), by Right-clicking on the ProjectSolution >Add>New Website.
Now Rightclick on the ASP.NET website and Click Proporties.Now Click on the Silverlight Applications Tab. Now click on Add , and select Use an existing Project in the solution. Now You wil be able to see the Silverlight Applications name .Now Click on Add again to add the silverlight application to ASP.NET website.
After that , Set the ASP.NET website as Startup Project and ..TestPage.aspx as the Start Page.

Just add the web application to your solution and go to your web project properties and under silverlight tab add your sl app

Related

How to add asp.net mvc style context menu item for asp.net web site?

I have a very large asp.net web site and I integrated asp.net mvc 5 there successfully. But now I didn't find any way to add feature, like, Add View, Add Controller, Go to View, etc from context menu. I know this can be done by changing Project GUID in Web Application.
So, what is the way for doing it for web site?
In Visual Studio : View > Solution Explorer > Click right button on mouse on your project.
If you want go to view, right click on return in ActionResult

can we build web application without masterpage in it

I want to build web application for a college in Microsoft Asp.net 3.5 framework which i have actions to database and login controls for each of the college members,but i feel working without master page in it for the web application. Is it possible ?Can you Please Specify
Yes, it's possible. Right click on your project, select Add > Add New Item > Web Form
Web Form does not use a master page while the "Web Form with Master Page" option does.

How to integrate silverlight into aspx?

I have created a Silverlight application now I want to embed it into my aspx page. Is there any video tutorial for this, which explains how to integrate silverlight in aspx page?
In your web project, make sure you've included a reference to the silverlight application so the .xap file will be in the clientbin folder.
Right-click on your web project and select Properties. Select the Silverlight Applications tab on the left. Click the Add... button and select your existing Silverlight project. Also, check the box that says, "Add a test page that references the control" and VS will include a new .ASPX page that will have the code to reference the Silverlight control.
Note: this assumes the silverlight project and the web project are in the same solution. I assume they are..
Here is an example of how a chart control can be embedded in an aspx page:
http://demos.telerik.com/aspnet-ajax/chart/examples/silverlight/defaultcs.aspx

How to open a silverlight web application as light window?

I created simple Silverlight Application using the web site host of the VS2010 ( default ) feature.
Now, I want to make the Silverlight Application to be shown as light window in the front of the default web site.
How can i do it ?
You can go OoB.
If you just wanted to show a modal dialog, then use the ChildWindow or MessageBox.
I think you could also remove the website from your solution and the Silverlight project will still open in the browser.
I am not so sure about what you mean by "Light Window", but I am sure these links will help you a lot:
Integrating Silverlight with a Web Page
How to: Add Silverlight to a Web Page by Using HTML
Update
If you checkout the web-host project, you'll see, that there is a test page that actually hosts the Silverlight project.
You can modify this page and move the Silverlight content around wherever necessary, or you might even embed it in a master page and/or use an external ASP.NET UserControl that will be used to load/host the Silverlight object dynamically.

How to run/debug multiple web application projects with-in the same solution?

I have 2 web application projects. One is my asp.net MVC app and the other is for the admin related functions which is asp.net web forms Dynamic Data. My MVC app would be the main site, but I would want the webforms to work under an Admin folder of the MVC site.
While debugging the application, I would like the "/admin/Default.aspx" link on the MVC site to link to the default page within my Dynamic Data site. How do I accomplish this? I know I can test each project independently.
Within the visual studio project, you can right click on a folder and select "Convert to Web Application" which resolved my issue.
The easiest way would be to run them both in separate virtual directories and use Url Rewriting to push requests for the root to the public site. You can nest ASP.NET applications, but that generally requires quite a bit of fussing with the configuration file to dodge inheritance issues.
You could achieve this behavior via your IIS-Manager. Click on the Website, navigate to the folder you want to behave like a separate application and use right-mouse click and press "convert-to-application".

Resources