English 中文(简体)
你们如何摆脱 as子、设计者。
原标题:How do you get rid of aspx.designer.cs?

This is way more difficult than it should be. I recreated a brand new web site project, created a brand new web form copy and pasted the code in a text file then pasted the code in the brand new webform and I get an error message:

“不应装上基因组”

守则:

<%@ Page Title="Generate Prefixes" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeBehind="GenPrefixList.aspx.cs" Inherits="GenPrefixList" %>

然后,我拿走了Inherits=“GenprefixList”的电文:

ASP.pages_genprefixlist_aspx, not contained a definition for PrefixID_S selected IndexChanged and no extension methods PrefixID_S selected IndexChanged接受第一种类型论点 ASP.pages_genprefixlist_aspx 可以找到(如果你没有指示或集会参考资料?)

PrefixID_SelectedIndexChanged is already in the codebehind but the aspx don t see it....

我甚至比较了我的其他页页,即设计时的类似页数,设计人文档和编码格式相同。 我还可以在一个网站项目中增加一个编印机。

这完全是荒谬的,我看不出,如何从零开始重新研究所有事项,而在某种程度上,该法典仍然作为px. Designer.cs。 这部法律仍然参照了px. Designer.cs:

   <div style="text-align:Left;float:right; width:56.5%; display:inline-block;">
        <asp:DropDownList ID="PrefixID" runat="server" AutoPostBack="true" 
                ToolTip="Select Prefix" onselectedindexchanged="PrefixID_SelectedIndexChanged">
                <%--<asp:ListItem Text="Select..."></asp:ListItem>--%>
                </asp:DropDownList>
        <asp:Label ID="lblRqdPrefix" runat="server" Text="required" CssClass="noshow" ></asp:Label>
        </div>
问题回答

You can t get rid of Inherits, and you shouldn t need to get rid of the designer.cs file. You just need to make sure that everything is mapped correctly.

GenPrefixList.aspx

<%@ Page Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="GenPrefixList.aspx.cs" Inherits="<Namespace>.GenPrefixList" %>

GenPrefixList.aspx.cs:

namespace <Namespace> //if applicable
{
    public partial class GenPrefixList : System.Web.UI.Page { ...

GenPrefixList.aspx. Designer.cs:

namespace <Namespace> //if applicable
{
    public partial class GenPrefixList { ...

您可以t get rid,Inherits=“GenprefixList”,其中注明了、<<<>>>>---------->。 查阅<代码>的文件 PrefixID_S selected IndexChanged methods. 贵国的法典是否落后于诸如<条码>等类别: 系统。 Web.UI.Page? 这就是应该怎样做的。 我的猜测可能是一些复印/帕斯特错误。





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!