Asp.net designer file not created
So the code gen creates an ascx, ascx. The 3 control files are placed together. When generating for project A, the control files after refresh appear all nested properly, eg.
I now wanted to use it for another project B , but when refreshing the files in the website, only the. The designer file does not nest; it simply sits at the same level as the ascx. Clicking "nest related files" over and over makes no difference. Project B also does not build. THe code behind file is correct, and the inherits attribute is also correct. This error naturally occurs for every control I generate. Also, when I delete ALL asp code from the.
So I suspect that the 2 issues are related: the fact that VS doesn't think that the designer file is the same as the. Any suggestions? Does anyone know the criteria that VS uses to nest related files? This could lead in to identifying the problem. Also, what's happening with namespaces here? Web sites in 2.
This could also be related. However, the namespace for the designer, ascx, and ascx. If there are some VS add-ins, please disable them temporarily to check the result.
Sometimes some other software may affect VS such as Resgarper. Whether you will get the same issue when you create a new asp. If the issue only occured in the specific app, please delete. Button Button1;. If you want a button click method in Default. In addition, in order to get the code to synchronize with the designer, please save you changes after you modify the web form.
If no help, generally repairing or reinstalling VS is able to resolve such issues. Please try it. We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. NET Web pages. NET page. However, the user control does not have html, body, and form elements; and the file name extension must be.
Open the Web site project to which you want to add user controls. If you do not already have a Web site project, you can create one. Some seem to be caused by Visual Studio bugs, others are caused by wrong usage or copy and pasting pages from outside your project. Be as it may, often these issues are deceptively easy to solve! Your project must be a Web Application project. If you have a Web Site project, you do no need to worry about designer.
0コメント