No1Coder
asked on
Help with Ajax update panel
I have a form with a clock on it using update panel (below). The clock updated every second.
Outside of the update panel, there is a text box. When a user types data in the text box, the text box changed event fires every second when the clock ticks. How can I suppress this?
<div style="background-color:tr ansparent; ">
<asp:UpdatePanel runat="server" ChildrenAsTriggers="false" UpdateMode="Conditional" ID="UpdatePanel1">
<ContentTemplate>
<asp:Label runat="server" ID="LabelClock" Width="80px" ViewStateMode="Disabled" />
<asp:TextBox ID="TextBoxClock" CssClass="EntryFieldProtec ted" runat="server" Width="80px" ReadOnly="True" ViewStateMode="Disabled">< /asp:TextB ox>
<asp:Timer ID="Timer1" runat="server" OnTick="Timer1_Tick" Interval="1000" ViewStateMode="Disabled" />
<asp:textbox id="TextBoxLog" TextMode="MultiLine" tabIndex="10" runat="server" CssClass="EntryFieldProtec ted" Width="326px" Height="152px" ReadOnly="True" ></asp:textbox>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
</Triggers>
</asp:UpdatePanel>
</div>
Outside of the update panel, there is a text box. When a user types data in the text box, the text box changed event fires every second when the clock ticks. How can I suppress this?
<div style="background-color:tr
<asp:UpdatePanel runat="server" ChildrenAsTriggers="false"
<ContentTemplate>
<asp:Label runat="server" ID="LabelClock" Width="80px" ViewStateMode="Disabled" />
<asp:TextBox ID="TextBoxClock" CssClass="EntryFieldProtec
<asp:Timer ID="Timer1" runat="server" OnTick="Timer1_Tick" Interval="1000" ViewStateMode="Disabled" />
<asp:textbox id="TextBoxLog" TextMode="MultiLine" tabIndex="10" runat="server" CssClass="EntryFieldProtec
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
</Triggers>
</asp:UpdatePanel>
</div>
Easy way would be to put the textbox in other updatepanel and set its updatemode=conditional
ASKER
I tried this but didn't make a difference. Both update panels are conditional.
Hey just try with this
ViewStateMode="Enabled" for TextBox and Timer Control
ViewStateMode="Enabled" for TextBox and Timer Control
ASKER
Changing viewstate makes no difference. Already tried this.
I put the text boxes into a separate update panel (below). As soon as I type into either one, the text changed event fires every time the timer event fires. So, my problem still exists.
<asp:UpdatePanel runat="server" ChildrenAsTriggers="true" UpdateMode="Conditional" ID="UpdatePanel2">
<ContentTemplate>
<table cellpadding="0" cellspacing="0">
<tr>
<td >
<asp:TextBox id="TextBoxUser" runat="server" CssClass="EntryField" MaxLength="128" TabIndex="10" TextMode="Password" Visible="true" Width="195px" ToolTip="Enter your TrackStar User ID in this field to identify yourself." OnTextChanged="TextBoxUser _TextChang ed"></asp: TextBox>
</td>
<td align="right">
<asp:label id="LabelPassword" runat="server">Password</a sp:label>
</td>
<td>
<asp:textbox id="TextBoxPassword" tabIndex="10" runat="server" CssClass="EntryField" Width="140px" TextMode="Password" MaxLength="16" Visible="True" AutoPostBack="True" OnTextChanged="TextBoxPass word_TextC hanged" ToolTip="Enter your TrackStar password in this field to log on to the Kiosk."></asp:textbox>
<asp:LinkButton id="LinkButtonAction" runat="server" OnClick="LinkButtonSignIn_ Click">OK< /asp:LinkB utton>
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
I put the text boxes into a separate update panel (below). As soon as I type into either one, the text changed event fires every time the timer event fires. So, my problem still exists.
<asp:UpdatePanel runat="server" ChildrenAsTriggers="true" UpdateMode="Conditional" ID="UpdatePanel2">
<ContentTemplate>
<table cellpadding="0" cellspacing="0">
<tr>
<td >
<asp:TextBox id="TextBoxUser" runat="server" CssClass="EntryField" MaxLength="128" TabIndex="10" TextMode="Password" Visible="true" Width="195px" ToolTip="Enter your TrackStar User ID in this field to identify yourself." OnTextChanged="TextBoxUser
</td>
<td align="right">
<asp:label id="LabelPassword" runat="server">Password</a
</td>
<td>
<asp:textbox id="TextBoxPassword" tabIndex="10" runat="server" CssClass="EntryField" Width="140px" TextMode="Password" MaxLength="16" Visible="True" AutoPostBack="True" OnTextChanged="TextBoxPass
<asp:LinkButton id="LinkButtonAction" runat="server" OnClick="LinkButtonSignIn_
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
You mean you are having two different update panel. In one update panel you are having textboxes and in second update panel you are having label and timer. Both the updatepanel are set as conditional?
Check if this is in master page and it contains update panel for your contenttemplate.
Check if this is in master page and it contains update panel for your contenttemplate.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Nothing else worked.