Last post Mar 19, 2014 07:37 AM by Happy Chen - MSFT
Mar 18, 2014 03:56 AM|athar_techsavvy|LINK
I have a textbox on top of page and am using validatorcalloutextender to validate the textbox, also I've a button in the bottom of the page. When user clicks button, I want to focus on the textbox as the user is unable to see the error message,how?
Mar 18, 2014 04:56 AM|chandrashekar|LINK
In button click use the Focus method to set the focus to textbox.
protected void btnSubmit_Click(object sender, EventArgs e)
Mar 18, 2014 05:34 AM|aishwary|LINK
Mar 19, 2014 07:37 AM|Happy Chen - MSFT|LINK
you have to sumbmit the form of page, then trigger the textboxs on validate.
if you click a button , the button is input tag, you need to use submit button. and sumbmit the form of page.
if you click a button, the button is server control, that have to postback the page and sumbmit the form of page, as shown below:
<input id="ButtonTest" type="submit" value="ButtonTest" /> <br />
<asp:Button ID="Button1" runat="server" Text="Submit" OnClick="Button1_OnClick" />
validating the textbox which is based on the form, validate success to submit the form, validate failed not to submit the form and show error page.
please refer to the link :http://www.asp.net/ajaxlibrary/ajaxcontroltoolkitsamplesite/validatorcallout/validatorcallout.aspx