How to develop an aspx webpart for my SharePoint? - asp.net

I´ve got a question!
I want to develop an aspx site for an sharepoint. I have Visual Studio and i cant find a way to develop an aspx page, only an asp.net core solution. Is this the same? Or what do i have to do, to get myself an aspx webpart i can upload to my sharepoint site?
Thanks for your help!

Aspx files are part of ASP.NET Web Application (.NET Framework) - Web Forms project type. So you must install .NetFramework if it doesn't show in project templates list.
Here is how to create a project.
Here is how to install .NetFramework in Visual Studio.

Related

What template to use for new website in Visual Studio 2015?

I'm confused by the myriad of options for creating a new website in Visual Studio 2015.
In particular, I don't understand the difference between
File > New... Website... ASP.NET Website (Razor v3) and
File > New... Project... ASP.NET Web Application > ASP.NET 4.6.1 Templates > MVC 4
What I'd like is a website that works well with Entity Framework and provides scaffolding to quickly create data entry forms.
It seems MVC 4 provides this, but is there something similar for Razor?
The main difference between the Web Application and the Website is that it will compile the application into a single DLL file at build time. In order to update the project it must be recompiled and the DLL file published for changes to occur.
Read more at ASP.NET Web Site or ASP.NET Web Application? and Web Application Projects versus Web Site Projects in Visual Studio

Integrating a ASP.NET (.aspx) page into a existing Lightswitch project

I have a aspx page developed in Visual Studio ASP and I want to integrate it into a Visual Studio LightSwitch existing project. Can anyone tell me how can I do that?
I've not tried to integrate it into Lightswitch, because if any changes were required I found it easier to leave it in its own Visual Studio project. I simply created a button and added a link to it (after I had uploaded it onto the IIS, for example:
window.open("IIS URL");
OR
window.open("IIS URL/Document.xls");
so if you don't find a way to do this, then hopefully this will help :)

Why can't I find the Controllers folder in Visual studio 2010

I'm creating an ASP.net website, I am trying to find the controllers folder but I can't see it listed:
Here is a picture of what's listed:
http://s27.postimg.org/kjy7tjr9v/Asp_net_Images_Folder.jpg
A asp.net web forms project will not have a controllers folder. Make sure you set it up as an MVC project.
You need to convert your Web Site to a Web Application and then add the MVC components from the nuget package here:
http://www.nuget.org/packages/AspNetMvc

ASP.NET Add Razor page in Web Application not Web Site, NO MVC

I just found a strange thing in Visual Studio 2010.
I can add a Razor page into a Web Site project, but I cannot do it in a Web Application project.
I do know I can create a ASP.NET MVC(1-4) project which allows me to add a Razor page into it.
After I checked the differences between Web Site(WS) project and Web Application(WA) project, it seems to me that WA is to trend to be in most cases and has more features than WS.
So my question is:
Visual Studio 2010 allows us to add a Razor page into a WS project(you can find it when adding a new page in the list of templates), but why it does not provide the Razor page in the template in the WA project?
I'm curious about it. Waiting for your answers :)
Cheers
I had the same problem when creating a new, Empty web application. I wanted to use MVC. Despite adding the references required, it still won't let me create files by right clicking on a folder.
However, if you have SP1 installed on Visual Studio 2010, you can:
Right Click > Add > New from Template> Razor MVC View
Hope this helps.

How to get the Silverlight XAP copied to the clientbin on build

I am just getting started with Silverlight and have recently added a Silverlight project to an established solution. In this particular scenario my solution included an existing ASP.NET web site (not application) which Visual Studio kindly offered to integrated my Silverlight application into, which I accepted.
So everything is fine and all, and the Silverlight XAP is being copied to the web site's ClientBin directory. Now I have decided to start a new ASP.NET MVC web application that will eventually replace the older (non-MVC) web site. But I cannot for the life of me figure out what Visual Studio modified to get the XAP to automatically appear in the web site's ClientBin on build, so that I can reproduce that on my MVC site.
So my question is essentially, what are the manually steps for getting Visual Studio to autocopy a Silverlight application's XAP to a newly added ASP.NET MVC web application?
You can do this through the properties of your web project. The Silverlight tools for visual studio add a new tab to the properties of web projects named "Silverlight Links".
Add a reference to your Silverlight project here, with the folder where you want it, and visual studio will make the copy for you.
The copying of the XAP to the ClientBin is a MSBuild task. If you're using a standard ASP.NET project template it can be found under the Silverlight Link section.
For everything else you might be able to figure out the name of the MSBuild task and add it to your ASP.NET MVC project. The easier solution would probably be to use a custom post-build event on the APS.NET project to copy the file.
There is no "magic" happening, oter than copying the XAP file from the BIN directory of your Silverlight project to the ClientBin of your web application. It doesn't even have to live inside the ClientBin directory - you can copy it to any directory, or the root of your site.
Update: The recently released Beta 1 of ASP.NET MVC includes support for Silverlight projects, so you can link it to your ASP.NET MVC application the same way you do for regular ASP.NET applications.
Go to the property pages of your Silverlight application, Choose Build Events Tab, Enter following line in Post-Build events command line:
copy $(TargetDir)*.xap $(SolutionDir)<youar web solution folder name such as app.web>\ClientBin
Now onwards, on each successful build, the xap file will be copied automatically.
This is a somewhat older post so it probably has changed... in my Visual Studio under the web project there is a tab called "Silverlight Applications". There is an add button there for existing projects that you import into the solution and you can add them and choose to place the xap in the ClientBin or anywhere else. Not sure if you have to have the SDK installed to have this tab. I have it installed so you may have to. I don't do MVC, so it may be different for MVC projects, I don't know.

Resources