this.el为null,由引起(this.el is null, caused by )

编程入门 行业动态 更新时间:2024-10-28 09:26:28
this.el为null,由
引起(this.el is null, caused by )

好吧我很难过,我有一个好的10个其他页面都使用相同的布局等所有工作正常,但我创建了一个新的页面,无法让它工作。

我注意到导致错误的原因,但我不知道为什么或如何解决它。 看看下面的代码,

它是一个带有runat=server , Ext.Net Resource Manager,Viewport,Tab Panel和2 Panels的表单,后面没有代码。

当我加载这个时,我得到了可怕的this.el is null在Firefox中this.el is null并且Uncaught TypeError: Cannot set property 'setSize' of null在Chrome中Uncaught TypeError: Cannot set property 'setSize' of null 。 但是,我删除了表单标签,一切正常。 现在您可能会说删除表单标记,但我不能在以后添加需要此标记的asp.net控件。

标记:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="PriceSetting.aspx.cs" Inherits="V2_RenewalsProcess_PriceSetting" %> <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %> <DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Ovott V2</title> </head> <body> <form id="pricesetting" runat="server"> <ext:ResourceManager ID="ResourceManager1" runat="server" /> <ext:Viewport ID="Viewport1" runat="server" Layout="border"> <Items> <ext:TabPanel ID="TabPanel1" runat="server" Region="Center"> <Items> <ext:Panel ID="Panel5" runat="server" Title="To Be Submitted" Border="false"> </ext:Panel> <ext:Panel ID="Panel6" runat="server" Title="Awaiting Approval"> </ext:Panel> </Items> </ext:TabPanel> </Items> </ext:Viewport> </form> </body> </html>

Ok I'm stumped, I have a good 10 other pages all using the same layout etc all working fine, but I created a new page and cannot get it to work.

I have noticed what is causing the error but I don't know why or how to fix it. Have a look at the code below,

Its a form with runat=server, Ext.Net Resource Manager, Viewport, Tab Panel and 2 Panels, no code behind.

When I load this i get the dreaded this.el is null in Firefox and Uncaught TypeError: Cannot set property 'setSize' of null in Chrome. But alas I remove the form tag and everything works as it should. Now you might say well just remove the form tag, but I cant will add asp.net controls later that needs this tag.

Markup:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="PriceSetting.aspx.cs" Inherits="V2_RenewalsProcess_PriceSetting" %> <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %> <DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Ovott V2</title> </head> <body> <form id="pricesetting" runat="server"> <ext:ResourceManager ID="ResourceManager1" runat="server" /> <ext:Viewport ID="Viewport1" runat="server" Layout="border"> <Items> <ext:TabPanel ID="TabPanel1" runat="server" Region="Center"> <Items> <ext:Panel ID="Panel5" runat="server" Title="To Be Submitted" Border="false"> </ext:Panel> <ext:Panel ID="Panel6" runat="server" Title="Awaiting Approval"> </ext:Panel> </Items> </ext:TabPanel> </Items> </ext:Viewport> </form> </body> </html>

最满意答案

好吧,最后在我的同事的帮助下,我们解决了这一切,这一切都归结为一个角色......一个“!” 你可能会问在哪里?

原始代码

<DOCTYPE html PUBLIC "...

固定代码

<!DOCTYPE html PUBLIC "...

现在它正在运作

OK finally with the help of my colleague we solved this and it all came down to one character... a "!" and you might ask where?

Original Code

<DOCTYPE html PUBLIC "...

Fixed Code

<!DOCTYPE html PUBLIC "...

Now it is working

更多推荐

本文发布于:2023-08-03 01:01:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1382430.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:el   null   caused

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!