2
Answers

How to avoid the Page Refresh when date selected time

Here is my code for select a date in Text box,when i select a date Adds the 5 days in the grid view label column below i am coloured the label,5 days adds correctly using TextChanged event, but one problem is every time the page is refresh how avoid if know share me!
 
Thank You
 
<ItemTemplate><asp:UpdatePanel runat="server" ID="UpId"
UpdateMode="Conditional" ChildrenAsTriggers="true">
<ContentTemplate>
<asp:TextBox ID="txtScheduleDate" runat="server" CssClass="txt" Width="100px" Text='<%#Eval("schedulePickDate")%>' OnTextChanged="txtScheduleDate_TextChanged" AutoPostBack="true"></asp:TextBox>
<asp:CalendarExtender ID="CaltxtScheduleDate" Format="dd-MM-yyyy" runat="server" TargetControlID="txtScheduleDate">
</asp:CalendarExtender>
</ContentTemplate>
</asp:UpdatePanel>
</ItemTemplate>
<asp:TemplateField Visible="true" HeaderText="EPD">
<ItemTemplate>
<asp:Label ID="lblEpd" runat="server" Text='<%#Eval("epd")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
 
Answers (2)
1
Manav Pandya

Manav Pandya

NA 7.1k 24k 7y
Hello
 
For that i think you should check "IsPostBack" propery :
 
change it to  ->  IsPostBack="false";
 
And you have AutoPostBack="true" so change it to "false"
 
Thanks 
0
Savadamuthu Saravanan

Savadamuthu Saravanan

NA 262 6.1k 7y
Thank You for your info Manav Pandya when i Changing AutoPostBack="false" time txtScheduleDate_TextChanged not fired, so i am enabled this property. Onclick event not passing to cs page, any other event is know share me.
 
Thank You