Click here to Skip to main content
15,887,434 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Textbox is in a panel.

I make autopostback property true but still textchanged event not fired.
Posted
Updated 16-Feb-11 21:33pm
v2
Comments
Sunasara Imdadhusen 17-Feb-11 2:22am    
How could you know it doesn't work?
Michael Waguih 17-Feb-11 2:25am    
Please put your code in your question for trying to fix it.
ashwini hajgude 17-Feb-11 5:00am    
<asp:Panel ID="panelfrmtodt" runat="server">
<table>
<tr>
<td style="text-align: left; vertical-align: top; width: 69px; height: 23px;" align="left">
<asp:Label ID="lblfrmdt" runat="server" Text="From Date" ForeColor="#175DAA" Font-Names="Verdana"
Font-Size="8pt"></asp:Label>
</td>
<td style="text-align: left; vertical-align: top; height: 23px;" align="left">
<asp:TextBox ID="txtfrmdt" runat="server" Font-Names="Verdana" Font-Size="8pt" ForeColor="#175DAA"></asp:TextBox>
</td>
<td style="text-align: left; vertical-align: top; height: 23px;" align="left">
<asp:Image ID="imgfrmdt" runat="server" ImageUrl="~/images/Calendar_scheduleHS.png"
ForeColor="Desktop"></asp:Image>
</td>
<td style="text-align: left; vertical-align: top; height: 23px;" align="left">
<asp:Label ID="lbltodt" runat="server" Text="To Date" ForeColor="#175DAA" Font-Names="Verdana"
Font-Size="8pt"></asp:Label>
</td>
<td style="text-align: left; vertical-align: top; height: 23px;" align="left">
<asp:TextBox ID="txttodt" runat="server" Font-Names="Verdana" Font-Size="8pt" ForeColor="#175DAA"
OnTextChanged="txttodt_TextChanged" AutoPostBack="True" CausesValidation="True"></asp:TextBox>
</td>
<td style="text-align: left; vertical-align: top; height: 23px;" align="left">
<asp:Image ID="imgtodt" runat="server" ImageUrl="~/images/Calendar_scheduleHS.png"
ForeColor="Desktop"></asp:Image>
</td>
</tr>
</table>
</asp:Panel>


cs file
protected void txttodt_TextChanged(object sender, EventArgs e)
{
showgrid();
}
Dalek Dave 17-Feb-11 3:33am    
Edited for Clarity.

Hi Ashwini,

The TextBox change event only work when you Leave (Lost Focus) from Textbox.

Please try it!

Thanks,
Imdadhusen
 
Share this answer
 
Comments
ashwini hajgude 17-Feb-11 2:34am    
No even textbox lost focus it does not work
Michael Waguih 17-Feb-11 2:37am    
Please give us your code to help you fixing your problem
Sunasara Imdadhusen 17-Feb-11 7:21am    
Just set CausesValidation="False"
Dalek Dave 17-Feb-11 3:33am    
Good Answer.
JF2015 18-Feb-11 0:49am    
Very good answer. 5+
Hope this[^] might help you.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900