Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

ModalPopupExtender textbox always reset to its initial values

$
0
0

I have the following:

<asp:TextBox ID="FromDateTxtBox" runat="server" Height="32px"
style="border:solid black 1px; font-family: 'sakkal Majalla'; font-size: 24px; text-align: right;" Width="150px"></asp:TextBox><asp:CalendarExtender ID="Calendar1" runat="server" Format="dd-MMMM-yyyy" PopupButtonID="imgPopup" TargetControlID="FromDateTxtBox"></asp:CalendarExtender>

In the Page_Load event, I have:

If IsPostBack = False Then
.
.
.
FromDateTxtBox.Text = Format("01-01-2013", "dd-MMMM-yyyy")
Calendar1.SelectedDate = CDate("01-01-2013")
.
.
.

End If

The AutoPostBack property of FromDateTxtBox is set toFalse

The problem I have is that any action I made in the page that makes the page to be postback (Button, DropDownList, Gridview radio button,....) causes the text value of the FromDateTxtBox to its initial value, which means losing the value entered by the user.

Thus, How can I prevent this behavior?


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>