If there are more than one watermark ccontrol in one user control, there is problem as following:
If you input data for textbox1 using popup calendar, it will clean data in textbox2.
If you input data for textbox2 using popup calendar, it will clean data in textbox1.
But if you type the data in textbox, no this problem.
<atlasToolkit:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender1" runat="server">
<atlasToolkit:TextBoxWatermarkProperties ID="WaterMark1" TargetControlID="textbox1"
WatermarkText="<Type Batch Name Here>" WatermarkCssClass="watermarked" />
<atlasToolkit:TextBoxWatermarkProperties ID="WaterMark2" TargetControlID="textbox2"
WatermarkText="<DD/MM/YYYY>" WatermarkCssClass="watermarked" />
</atlasToolkit:TextBoxWatermarkExtender>Could you please post a simple, complete sample page that demonstrates the problem?
Sample code here:
<%@. Control Language="VB" AutoEventWireup="false" CodeFile="Edit.ascx.vb" Inherits="Common_Edit" %>
<%@. Register Assembly="AtlasControlToolkit" Namespace="AtlasControlToolkit" TagPrefix="atlasToolkit" %
<asp:Panel ID="Panel1" runat="server" CssClass="popupControl">
<atlas:UpdatePanel ID="UpdatePanel1" runat="server" Mode="Conditional" RenderMode="Inline">
<ContentTemplate>
<center>
<asp:Calendar ID="Calendar1" runat="server" BackColor="White" BorderColor="#999999"
CellPadding="1" DayNameFormat="Shortest" Font-Names="Verdana" Font-Size="8pt"
ForeColor="Black" Width="160px" OnSelectionChanged="Calendar1_SelectionChanged">
<SelectedDayStyle BackColor="#666666" Font-Bold="True" ForeColor="White" />
<TodayDayStyle BackColor="#CCCCCC" ForeColor="Black" />
<SelectorStyle BackColor="#CCCCCC" />
<WeekendDayStyle BackColor="#FFFFCC" />
<OtherMonthDayStyle ForeColor="#808080" />
<NextPrevStyle VerticalAlign="Bottom" />
<DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="7pt" />
<TitleStyle BackColor="#999999" BorderColor="Black" Font-Bold="True" />
</asp:Calendar>
</center>
<atlasToolkit:PopupControlExtender ID="PopupControlExtender1" runat="server">
<atlasToolkit:PopupControlProperties TargetControlID="textbox1" PopupControlID="Panel1"
Position="Bottom" />
</atlasToolkit:PopupControlExtender>
</ContentTemplate>
</atlas:UpdatePanel>
</asp:Panel>
<asp:Panel ID="Panel2" runat="server" CssClass="popupControl">
<atlas:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<center>
<asp:Calendar ID="Calendar2" runat="server" BackColor="White" BorderColor="#999999"
CellPadding="1" DayNameFormat="Shortest" Font-Names="Verdana" Font-Size="8pt"
ForeColor="Black" Width="160px" OnSelectionChanged="Calendar2_SelectionChanged">
<SelectedDayStyle BackColor="#666666" Font-Bold="True" ForeColor="White" />
<TodayDayStyle BackColor="#CCCCCC" ForeColor="Black" />
<SelectorStyle BackColor="#CCCCCC" />
<WeekendDayStyle BackColor="#FFFFCC" />
<OtherMonthDayStyle ForeColor="#808080" />
<NextPrevStyle VerticalAlign="Bottom" />
<DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="7pt" />
<TitleStyle BackColor="#999999" BorderColor="Black" Font-Bold="True" />
</asp:Calendar>
</center>
<atlasToolkit:PopupControlExtender ID="PopupControlExtender2" runat="server">
<atlasToolkit:PopupControlProperties TargetControlID="textbox2" PopupControlID="Panel2"
Position="Bottom" />
</atlasToolkit:PopupControlExtender>
</ContentTemplate>
</atlas:UpdatePanel>
</asp:Panel
<atlasToolkit:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender1" runat="server">
<atlasToolkit:TextBoxWatermarkProperties ID="WaterMark1" TargetControlID="textbox1"
WatermarkText="<DD/MM/YYYY>" WatermarkCssClass="watermarked" />
<atlasToolkit:TextBoxWatermarkProperties ID="WaterMark2" TargetControlID="textbox2"
WatermarkText="<DD/MM/YYYY>" WatermarkCssClass="watermarked" />
</atlasToolkit:TextBoxWatermarkExtender
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td>
<atlas:UpdatePanel ID="EditUpdatePanel" RenderMode="Inline" Mode="Conditional" runat="Server">
<ContentTemplate>
<table id="Table11" cellspacing="0" cellpadding="0" border="0"
style="width: 752px">
<tr>
<td>
</td>
<td align="right">
Batch Date:</td>
<td>
<asp:TextBox ID="textbox1" runat="server" CssClass="TextBox" Width="152px"></asp:TextBox></td>
<td align="right">
Deposit Date:</td>
<td>
<asp:TextBox ID="textbox2" runat="server" CssClass="TextBox" Width="152px"></asp:TextBox></td>
</tr>
</table>
</ContentTemplate>
</atlas:UpdatePanel>
</td>
</tr>
</table
This also sounds like the problem I found yesterday with 3 textboxes in a DetailsView InsertItemTemplate. One is connected to a calendar popup, another a plain textbox, and the third is my custom auto complete extender. Clicking in the textbox with the popup calendar clears the watermark in the other 2 textboxes.
Kent, the problem you're hitting seems to be because the PopupControl and TextBoxWatermark that are both pointed to the same TextBox are conflicting. If you remove the TBW, the scenario seems to work fine. I don't currently have a good suggestion for making the two controls work together due to the way that UpdatePanels get involved here. Hope this helps.
No comments:
Post a Comment