Tallan's Technology Blog

Tallan's Top Technologists Share Their Thoughts on Today's Technology Challenges

Posts Tagged "Visual Web Parts"

SharePoint 2013 Visual Web Part Auto Generated Files

Brian Feldmann

As you may already know, SharePoint allows developers to create custom web parts a few different ways. You can create a web part through code using the Visual Studio Web Part Template or you can create it with a Visual Web Part Template. The Visual Web Part templates are nice because they allow you to use user controls (.ascx) files to generate your markup.
If you’ve ever created one of these Visual Web parts you’ve probably noticed that there is a code behind .ascx.cs file and another odd file with a ascx.g.cs extension. This .asxc.g.cs file is automatically generated by Visual Studio and is quite important. Every time you make an update or change the .ascx file and then press save, Visual Studio pushes those updates into this auto-generated file. The .ascx control is never actually deployed; instead the code files are packaged…