Hi @Joseph Hedbon,
When you use MsgBox
it will generate a Message Box on the server. So, if you want to check it you could minimize your Browser and check it in your screen.
If you want to prompt the user, just use javascript alert in TextChange
event will be ok, it will show in browser. Something like this:
ScriptManager.RegisterStartupScript(Me, Me.GetType(), "alertMessage", "alert('Please enter an age between 0 and 80');", True)
Also, if you want to improve the experience. You could specify it by using UpdatePanel
. Cause by default AutoPostBack
will refresh the whole page.
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:TextBox ID="TextBox1" runat="server" AutoPostBack="True" OnTextChanged="TextBox1_TextChanged"></asp:TextBox>
<asp:DropDownList ID="DropDownList1" runat="server" Visible="False"></asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
Best regards,
Xudong Peng
If the answer is the right solution, please click "Accept Answer" and kindly upvote. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.