Wednesday, March 21, 2012

DropDownExtender problem

Hi all...

I have problem with DropDownExtender.

There is on the page have placed DropDownExtender and disabled TextBox Control with some text.

When I make right click on the text in disabled textbox, I get JavaScript error like "Object doesn't support this property or method". (Problem with getClientRects function in Script sources file)

Simple content page:

<%@dotnet.itags.org. Page Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TestApp.Default" Title="Untitled Page" %><%@dotnet.itags.org. Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %><asp:Content ID="Content1" ContentPlaceHolderID="cphContent" runat="server"><table cellpadding="0" cellspacing="0" border="0"> <tr> <td align="left"> <asp:Label ID="lblLinkName" runat="server" Font-Size="12px" Text="Show Links" Style="display: block; padding: 2px; padding-right: 20px; color: White;font-size:12px;font-weight:700;font-family: Verdana,Arial, MS Sans Serif, Tahoma;" /> <asp:Panel ID="DropPanel" runat="server" Style="display: none; visibility: hidden; background: White;"> <table cellpadding="2" cellspacing="0" border="0" style="width:150px; border: solid 1px Gray;"> <tr> <td><asp:LinkButton ID="lnkFirst" runat="server" Text="First Link" /></td> </tr> <tr> <td><asp:LinkButton ID="lnkSecond" runat="server" Text="Second Link" /></td> </tr> <tr> <td><asp:LinkButton ID="LinkThird" runat="server" Text="Third Link" /></td> </tr> </table> </asp:Panel> <ajaxToolkit:DropDownExtender runat="server" ID="DDE" TargetControlID="lblLinkName" DropDownControlID="DropPanel" HighlightBackColor="#256294" HighlightBorderColor="white" /> </td> </tr> <tr> <td> </td> </tr> <tr> <td><asp:TextBox ID="txtField" runat="server" Width="200" /></td> </tr></table></asp:Content>
 CodeBehind:
 
using System;using System.Data;using System.Configuration;using System.Collections;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;namespace TestApp{public partialclass Default : System.Web.UI.Page {protected void Page_Load(object sender, EventArgs e) {if (!Page.IsPostBack) { txtField.Text ="Hello World!"; txtField.Enabled =false; } } }}

Try to reproduse this bug or leave your email and I send example.

Please help.Sad

No comments:

Post a Comment