I think many developer don't know exactly how many files on a one aspx page. Sometimes, that is causes more problems arise. Exactly, one aspx page have 3 file: - 1 layout: example.aspx - 1 code behind: example.aspx.c - and 1 designer: example.aspx.designer.cs Some people will say, where is designer file? I can't see it.... Microsoft doesn't want to show you designer file. Because if you don't understand what it is, maybe you can change it and make it wrong, and aspx page will fail and can't run. So, Visual Studio will generate it automatic and hidden it . Have any ideal about it ? And is it necessary or not ? In some cases you will don't need it and you will make it by yourself. Do you want more information ?
Designer files exist as part of a 'project' when you create a new 'Web Application', as opposed to a new 'Web Site' (in visual studio), there is a difference between the two. Here is a good article on the topic: http://www.dotnetspider.com/resources/1520-Difference-between-web-site-web-application.aspx
hi, when you create a project you are more concerned with .aspx and .aspx.cs file because the wizard will ask you regarding the code behind file.But the designer file we never do anything or any changes in that file . At the end of the day what you want to create is going to be on .aspx page .
Yup Even I have observed this file and have also worked on such an environment where we can see all these 3 files. But I am not sure as to how this file "Designer file" can be made visible as i worked on such a application provided by client for some modification . But Dont know what the reason was its really a Bad experience to work with this as it needs to recompile the project again if you make a small change and also lot of time it generates error.
Exactly developer don't need to take care about designer file. But it is a way to understand clearly about ASP.Net and help to create control, raise event.... dynamically.
but there is only a designer file when creating a 'Web Application' in visual studio.. if you create a 'Web Site' then there is no designer file, they are completely different things.
Thanks for your valuable reply. I only knows .aspx and aspx.cs file in the case when user select code in separate file. Could you please post the url where you have study about this...? Its will really help me understand .net more.
Hey I have done classroom program in Asp.Net but not heard about this designer.cs file. Please provide how to see this file visual studio.
You should have Visual studio enterprise/developer version to see designer.cs file. Exactly, designer.cs will declare variable controls for you. Ex: File Asp.Net <asp:hyperlink id="hplLogo" runat="server"></asp:hyperlink> Code (markup): File designer.cs protected global::System.Web.UI.WebControls.HyperLink hplLogo; Code (markup): If you don't want VS automatic generated code, you can delete designer.cs file, and declare variable controls in by yourself. File codebehind: protected System.Web.UI.WebControls.HyperLink hplLogo; Code (markup):