I have a problem. Currently, I set the textbox value during PageLoad. However, this triggers the textbox change event.
Markup
<asp:TextBox ID="txtToDate" CssClass="text"
runat="server" Width="100px" ReadOnly="false"
AutoPostBack="true" ></asp:TextBox>
On pageload
txtToDate.Text = Format(Now.Date, "MM/dd/yyyy")
Textchange Event
Protected Sub txtToDate_TextChanged(ByVal sender As Object,
ByVal e As System.EventArgs) Handles txtToDate.TextChanged
Me.Grid.Visible = False
End Sub
How can I prevent the change during PageLoad from triggering the texbox change event?
As mentioned in your question, you don’t want to hide the grid during the
PageLoadevent, but you want to hide the Grid on theTextChangeevent of theTextbox. You can try something like…