Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
C#
How can I display validation messages inside the textbox Or through bootstrap popover Or is there any other better way to display Validation messages without disturbing layout. ????
Note: Using Asp Validation Control and I don't want to use validation summary control.


What I have tried:

I have tried this
<form id="form1" runat="server">

<asp:TextBox ID="txtName" CausesValidation="true" runat="server">

<asp:RequiredFieldValidator ID="RequiredFieldValidator1"
runat="server" ErrorMessage=""
ControlToValidate="txtName" CssClass="" Display="Dynamic"
title="Dismissible popover" data-toggle="popover" data-trigger="focus"
data-content="Click anywhere in the document to close this popover">


<input id="btnSubmit" type="button" value="Submit" />

</form>

<script>
$(function () {
$("[data-toggle = 'popover']").popover();
});
</script>
Posted

1 solution

you should check this - Cool way to display validation error message

http://asp.net-tutorials.com/validation/required-field-validator/[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900