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..

推荐答案

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)

Asp.net相关问答推荐

如何在 GridView 单元格中的(即
)中呈现解码的 HTML

Dotnet core 2.0 身份验证多模式身份 cookie 和 jwt

业务逻辑中的实体框架最佳实践?

OnCheckedChanged 事件未触发

正在检索组件的 COM 类工厂......错误:80070005 访问被拒绝. (来自 HRESULT 的异常:0x80070005 (E_ACCESSDENIED))

__doPostBack 未定义

忽略默认文档的表单身份验证

asp.net Button OnClick 事件未触发

ASP.net 与 PHP( Select 什么)

使用 ASPNet_Regiis 加密自定义配置部分 - 你能做到吗?

ASP.NET 中的全局资源与本地资源

不能在 DropDownList 中 Select 多个项目

ASP.NET web.config:system.web.compilation 中的 debug 属性的默认值是什么?

如何强制 netwtonsoft json 序列化程序将 datetime 属性序列化为字符串?

ASP.Net 错误:应用程序池的标识无效

ASP.NET:在 Response.Redirect(...) 之后代码会发生什么?

将 HTML 字符串转换为图像

Application_Start 和 Application_OnStart 之间的区别

如何将代码中的变量调用到aspx页面

获取 POST 变量