Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Regenerate designer.cs [duplicate]

I just deleted a designer.cs file from a aspx page.. (Don't ask how I can do that.. You don't really want to know..) Is it a way to regenerate the file for the aspx page? I was hoping that something like "right-click/ generate designer" exists but it is not the case.. :-(

So thanks if somebody have an idea..

like image 210
bAN Avatar asked Feb 21 '11 13:02

bAN


People also ask

What is ASPX designer CS?

aspx. designer. cs file contains all the definition of the controls that are being used by the page. It's just segregation of the code using partial class feature.


1 Answers

Find another solution to my Question, right-click on the aspx file, then choose "convert to web application" and then, the designer.cs file is regenerated..

It is more easier and quick..


This option is no longer available in VS2013, but you can accomplish the same thing by selecting your project in the Solution Explorer, then going to the Project option on the Menu Bar. Near the bottom you will see the Convert to Web Application option. This will generate designer files for all the *.aspx pages in your project that don't have them, but be aware that this may not be what you want if you have a mix of CodeFile *.aspx pages and CodeBehind files. This will also convert CodeFile pages to CodeBehind files. (Courtesy Joisey Mike)

like image 134
bAN Avatar answered Sep 30 '22 06:09

bAN