Jan 19, 2009, 10:46 PM
Error when change tooltip content within web control
Dear coolite team,
I try to put a textfield and a tooptip in web control(testtip.ascx), it runs ok, but when I try to change ext:tooltip content in Page_Load event of the control, the browser report below error:
Line: 97
Char: 329
Error: 'this.target' is null or not object
If I put the them in a normal aspx page, there's no error.
I wonder is it a bug or just my misunderstanding, pls help check, thanks a lot.
P.S. below are code for reference
testtip.aspx (main page)
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="testtip.aspx.cs" Inherits="Web.testfolder.testtip" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register assembly="Coolite.Ext.Web" namespace="Coolite.Ext.Web" tagprefix="ext" %>
<%@ Register src="testtip.ascx" tagname="testtip" tagprefix="uc1" %>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title></title>
</head>
<body>
<ext:ScriptManager ID="ScriptManager1" runat="server">
</ext:ScriptManager>
<form id="form1" runat="server">
<ext:TextField ID="TextField1" runat="server" Width="80" Text="Hello!"/>
<ext:ToolTip ID="tipForTextField1" runat="server" Target="TextField1" Html="tip!!!" />
<br />
<br />
<uc1:testtip ID="testtip1" runat="server" />
<br />
</form>
</body>
</html>
testtip.aspx.csusing System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Web.testfolder
{
public partial class testtip : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
tipForTextField1.Html = "Changed!!!";
}
}
}
testtip.ascx (user control)
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="testtip.ascx.cs" Inherits="Web.testfolder.testtip1" %>
<%@ Register assembly="Coolite.Ext.Web" namespace="Coolite.Ext.Web" tagprefix="ext" %>
<ext:ScriptManagerProxy ID="ScriptManagerProxy" runat="server" Theme="Gray">
</ext:ScriptManagerProxy>
<ext:TextField ID="TextField1inControl" runat="server" Width="80" Text="Hello!"/>
<ext:ToolTip ID="tipForTextField1inControl" runat="server" Target="TextField1inControl" Html="" />
testtip.ascx.csusing System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Web.testfolder
{
public partial class testtip1 : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
tipForTextField1inControl.Html = "Changed!!!";
}
}
}