locked
Validation RRS feed

  • Question

  • User-527908287 posted

    I am using Visual Studio Community 2015 and I used the Required Validation on my textboxes but it is not working. please how do I validate my textboxes?

    Thank you,

    Donald

    Here is the code:

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Report.aspx.cs" Inherits="Report" %>
    
    <!DOCTYPE html>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <meta charset="utf-8"/>
        <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
        <meta name="viewport" content="width=device-width, initial-scale=1"/>
        <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
        <title>Joscheck Report</title>
    
        <!-- Bootstrap -->
        <link href="css/bootstrap.min.css" rel="stylesheet"/>
        <link href="css/StyleSheet.css" rel="stylesheet" />
        <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
        <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
        <!--[if lt IE 9]>
          <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
          <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
        <![endif]-->
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
            <div class="navbar navbar-default navbar-inverse navbar-fixed-top" role="navigation" style="background-color:#200662; font-family:Nunito;">
            <div class="container">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse" style="background-color:#200662;color:white">
                        <span class="sr-only">Toggle Navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a class="navbar-brand" href="Homepage.aspx"></a>
                </div>
                <div class="navbar-collapse collapse">
                    <ul class="nav navbar-nav navbar-right">
                        <li><a href="Homepage.aspx" style="color: #FFFFFF">Home</a></li>
                        <li><a href="About.aspx" style="color: #FFFFFF">About Us</a></li>
                        <li><a href="Searchweb.aspx"style="color: #FFFFFF">Search</a></li>
                    </ul>
                </div>
            </div>
        </div>
        </div>
            <div class="container">
                        <h1 style="color: #200662; margin-top: 70px; font-family:St Ryde; font-size: xx-large">Vehicle Report</h1>
                        <p>
                            <i style="color: black; font-family:Tombouctou DEMO; font-size: large; font-style: normal">Let us know of any Car theft by Reporting</i>
                        </p>
                <hr/>
                    </div>
    
                   <!--Report start-->
            <br/>
             <div class="container" style="margin-top:10px;">
                <div class="form-horizontal">
                    <div class="page">
    
                            <div class="form-group">
                                <div class="col-xs-11">
                                    <asp:Label ID="Label1" runat="server" Font-Bold="true" CssClass="col-md-2 control-label" Text="Full Name"></asp:Label>
                                    <div class="col-md-3">
                                        <asp:TextBox ID="Nametext" CssClass="form-control" runat="server" Width="300px" placeholder="Full Name"></asp:TextBox>
                                    </div>
                                </div>
                            </div>
    
                         <div class="form-group">
                            <div class="col-xs-11">
                                <asp:Label ID="Label4" runat="server" Font-Bold="true" CssClass="col-md-2 control-label" Text="Phone Number"></asp:Label>
                                <div class="col-md-3">
                                    <asp:TextBox ID="phonetext" CssClass="form-control" runat="server" Width="300px" placeholder="Phone Number"></asp:TextBox>
                                </div>
                            </div>
                        </div>
    
                        <div class="form-group">
                            <div class="col-xs-11">
                                <asp:Label ID="Label2" runat="server" Font-Bold="true" CssClass="col-md-2 control-label" Text="VIN/Chasis Number"></asp:Label>
                                <div class="col-md-3">
                                    <asp:TextBox ID="Chasis" CssClass="form-control" runat="server" Width="300px" placeholder="VIN/Chasis Number"></asp:TextBox>
                                </div>
                            </div>
                        </div>
    
                        <div class="form-group">
                            <div class="col-xs-11">
                                <asp:Label ID="Label7" runat="server" Font-Bold="true" CssClass="col-md-2 control-label" Text="Confirm VIN/Chasis Number"></asp:Label>
                                <div class="col-md-3">
                                    <asp:TextBox ID="Chasis2" CssClass="form-control" runat="server" Width="300px" placeholder="Re-enter VIN/Chasis Number"></asp:TextBox>
                                </div>
                            </div>
                        </div>
    
                        <div class="form-group">
                            <div class="col-xs-11">
                                <asp:Label ID="Label3" runat="server" Font-Bold="true" CssClass="col-md-2 control-label" Text="Type of Vehicle"></asp:Label>
                                <div class="col-md-3">
                                    <asp:TextBox ID="modeltext" CssClass="form-control" runat="server" Width="300px" placeholder="Vehicle Type E.g Honda Civic"></asp:TextBox>
                                    <%--<asp:RequiredFieldValidator ID="RequiredFieldValidatorUsername" CssClass="text-danger" runat="server" ErrorMessage="Username Field is Required!" ControlToValidate="Username"></asp:RequiredFieldValidator>--%>
                                </div>
                            </div>
                        </div>
    
                        <div class="form-group">
                            <div class="col-xs-11">
                                <asp:Label ID="Label5" runat="server" Font-Bold="true" CssClass="col-md-2 control-label" Text="E-mail Address"></asp:Label>
                                <div class="col-md-3">
                                    <asp:TextBox ID="mailtext" CssClass="form-control" runat="server" Width="300px" placeholder="E-mail"></asp:TextBox>
                                </div>
                            </div>
                        </div>
    
                        <div class="form-group">
                            <div class="col-xs-11">
                                <asp:Label ID="Label8" runat="server" Font-Bold="true" CssClass="col-md-2 control-label" Text="Date Stolen"></asp:Label>
                                <div class="col-md-3">
                                    <asp:TextBox ID="Dat" CssClass="form-control" runat="server" Width="300px" height="35px" type="date"></asp:TextBox>
                                </div>
                            </div>
                        </div>
    
                        <div class="form-group">
                            <div class="col-xs-11">
                                <asp:Label ID="Label6" runat="server" Font-Bold="true" CssClass="col-md-2 control-label" Text="Location"></asp:Label>
                                <div class="col-md-3">
                                     <asp:TextBox ID="Location" CssClass="form-control" runat="server" Width="300px" placeholder="Location Stolen"></asp:TextBox>
                                </div>
                            </div>
                        </div>
    
                        <div class="form-group">
                            <div class="col-md-2"></div>
                            <div class="col-md-6">
                                    <asp:Button ID="btnreg" runat="server" Text="Report Car Theft" Font-Size="Larger" margin-left="100px" class="btn btn-success" Width="295px" OnClick="btnreg_Click" />
                                    <br />
                                    <asp:Label ID="Reportlabel" runat="server" Font-Bold="True" Font-Italic="True" Font-Size="Medium" ForeColor="#000099"></asp:Label>
                                <br />
                                <asp:Label ID="Errorlabel" runat="server"></asp:Label>
                                <br />
                                <br />
                            </div>
                        </div>
                    </div>
                </div>
            </div>
    
             <hr /><footer class="container navbar-fixed-bottom" style="background-color:black; width:auto; height:auto;">
                    <p class="pull-right" style="color: white;"><a href="#">Back to Top</a></p>
                    <p style="color: white;">Copyright &copy; 2018 Doxtrak Tech. All Rights Reserved. &middot; <a href="Homepage.aspx">Home</a> &middot; <a href="#">About Us</a> &middot; <a href="#">Contact</a> &middot</p>
            </footer>
        </form>
         <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
        <!-- Include all compiled plugins (below), or include individual files as needed -->
        <script src="js/bootstrap.min.js"></script>
    </body>
    </html>
    

    Friday, May 1, 2020 9:37 PM

Answers

  • User1535942433 posted

    Hi Donald416,

    Accroding to your description and codes,as far as I think,if you want to add a Required Validation  to your textboxes,I suggest you could use RequiredFieldValidator control or javascript validator event.

    Note:RequiredFieldValidator control's ControlToValidate must is the id of  textbox you need to be validated.

    More details,you could refer to below codes:

    <head runat="server">
         <meta charset="utf-8"/>
        <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
        <meta name="viewport" content="width=device-width, initial-scale=1"/>
        <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
        <title>Joscheck Report</title>
        <link href="Content/bootstrap.min.css" rel="stylesheet" />
        <!-- Bootstrap -->
    </head>
    <body>
        <form id="form1" runat="server">
    <div>
            <div class="navbar navbar-default navbar-inverse navbar-fixed-top" role="navigation" style="background-color:#200662; font-family:Nunito;">
            <div class="container">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse" style="background-color:#200662;color:white">
                        <span class="sr-only">Toggle Navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a class="navbar-brand" href="Homepage.aspx"></a>
                </div>
                <div class="navbar-collapse collapse">
                    <ul class="nav navbar-nav navbar-right">
                        <li><a href="Homepage.aspx" style="color: #FFFFFF">Home</a></li>
                        <li><a href="About.aspx" style="color: #FFFFFF">About Us</a></li>
                        <li><a href="Searchweb.aspx"style="color: #FFFFFF">Search</a></li>
                    </ul>
                </div>
            </div>
        </div>
        </div>
            <div class="container">
                        <h1 style="color: #200662; margin-top: 70px; font-family:St Ryde; font-size: xx-large">Vehicle Report</h1>
                        <p>
                            <i style="color: black; font-family:Tombouctou DEMO; font-size: large; font-style: normal">Let us know of any Car theft by Reporting</i>
                        </p>
                <hr/>
                    </div>
    
                   <!--Report start-->
            <br/>
             <div class="container" style="margin-top:10px;">
                <div class="form-horizontal">
                    <div class="page">
    
                            <div class="form-group">
                                <div class="col-xs-11">
                                    <asp:Label ID="Label1" runat="server" Font-Bold="true" CssClass="col-md-2 control-label" Text="Full Name"></asp:Label>
                                    <div class="col-md-3">
                                        <asp:TextBox ID="Nametext" CssClass="form-control" runat="server" Width="300px" placeholder="Full Name"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="*Name" ControlToValidate="Nametext" ForeColor="Red"></asp:RequiredFieldValidator>
                                    </div>
                                </div>
                            </div>
    
                         <div class="form-group">
                            <div class="col-xs-11">
                                <asp:Label ID="Label4" runat="server" Font-Bold="true" CssClass="col-md-2 control-label" Text="Phone Number"></asp:Label>
                                <div class="col-md-3">
                                    <asp:TextBox ID="phonetext" CssClass="form-control" runat="server" Width="300px" placeholder="Phone Number"></asp:TextBox>
                                </div>
                            </div>
                        </div>
    
                        <div class="form-group">
                            <div class="col-xs-11">
                                <asp:Label ID="Label2" runat="server" Font-Bold="true" CssClass="col-md-2 control-label" Text="VIN/Chasis Number"></asp:Label>
                                <div class="col-md-3">
                                    <asp:TextBox ID="Chasis" CssClass="form-control" runat="server" Width="300px" placeholder="VIN/Chasis Number"></asp:TextBox>
                                </div>
                            </div>
                        </div>
    
                        <div class="form-group">
                            <div class="col-xs-11">
                                <asp:Label ID="Label7" runat="server" Font-Bold="true" CssClass="col-md-2 control-label" Text="Confirm VIN/Chasis Number"></asp:Label>
                                <div class="col-md-3">
                                    <asp:TextBox ID="Chasis2" CssClass="form-control" runat="server" Width="300px" placeholder="Re-enter VIN/Chasis Number"></asp:TextBox>
                                </div>
                            </div>
                        </div>
    
                        <div class="form-group">
                            <div class="col-xs-11">
                                <asp:Label ID="Label3" runat="server" Font-Bold="true" CssClass="col-md-2 control-label" Text="Type of Vehicle"></asp:Label>
                                <div class="col-md-3">
                                    <asp:TextBox ID="modeltext" CssClass="form-control" runat="server" Width="300px" placeholder="Vehicle Type E.g Honda Civic"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidatorUsername" CssClass="text-danger" runat="server" ErrorMessage="Username Field is Required!" ControlToValidate="modeltext"></asp:RequiredFieldValidator>
                                </div>
                            </div>
                        </div>
    
                        <div class="form-group">
                            <div class="col-xs-11">
                                <asp:Label ID="Label5" runat="server" Font-Bold="true" CssClass="col-md-2 control-label" Text="E-mail Address"></asp:Label>
                                <div class="col-md-3">
                                    <asp:TextBox ID="mailtext" CssClass="form-control" runat="server" Width="300px" placeholder="E-mail"></asp:TextBox>
                                </div>
                            </div>
                        </div>
    
                        <div class="form-group">
                            <div class="col-xs-11">
                                <asp:Label ID="Label8" runat="server" Font-Bold="true" CssClass="col-md-2 control-label" Text="Date Stolen"></asp:Label>
                                <div class="col-md-3">
                                    <asp:TextBox ID="Dat" CssClass="form-control" runat="server" Width="300px" height="35px" type="date"></asp:TextBox>
                                </div>
                            </div>
                        </div>
    
                        <div class="form-group">
                            <div class="col-xs-11">
                                <asp:Label ID="Label6" runat="server" Font-Bold="true" CssClass="col-md-2 control-label" Text="Location"></asp:Label>
                                <div class="col-md-3">
                                     <asp:TextBox ID="Location" CssClass="form-control" runat="server" Width="300px" placeholder="Location Stolen"></asp:TextBox>
                                </div>
                            </div>
                        </div>
    
                        <div class="form-group">
                            <div class="col-md-2"></div>
                            <div class="col-md-6">
                                    <asp:Button ID="btnreg" runat="server" Text="Report Car Theft" Font-Size="Larger" margin-left="100px" class="btn btn-success" Width="295px" />
                                    <br />
                                    <asp:Label ID="Reportlabel" runat="server" Font-Bold="True" Font-Italic="True" Font-Size="Medium" ForeColor="#000099"></asp:Label>
                                <br />
                                <asp:Label ID="Errorlabel" runat="server"></asp:Label>
                                <br />
                                <br />
                            </div>
                        </div>
                    </div>
                </div>
            </div>
    
             <hr /><footer class="container navbar-fixed-bottom" style="background-color:black; width:auto; height:auto;">
                    <p class="pull-right" style="color: white;"><a href="#">Back to Top</a></p>
                    <p style="color: white;">Copyright &copy; 2018 Doxtrak Tech. All Rights Reserved. &middot; <a href="Homepage.aspx">Home</a> &middot; <a href="#">About Us</a> &middot; <a href="#">Contact</a> &middot</p>
            </footer>
        </form>
         <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
        <!-- Include all compiled plugins (below), or include individual files as needed -->
        <script src="Scripts/bootstrap.min.js"></script>
    </body>

    Result:

    More details,you could refer to below article:

    https://docs.microsoft.com/en-us/dotnet/api/system.web.ui.webcontrols.requiredfieldvalidator?view=netframework-4.8

    Best regards,

    Yijing Sun

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, May 4, 2020 2:47 AM

All replies

  • User409696431 posted

    Show us your code, and explain what you mean by "not working".

    Also, it's best to post questions in the forum group corresponding to the technology you are using, so people don't have to ask or guess.

    Friday, May 1, 2020 9:46 PM
  • User409696431 posted

    I have to assume, since you didn't specify, that the yellow highlighted RequiredFieldValidator is what you say is not working.

    Well, that would require a value in a control with an ID of "Username", which I can't see in your code.

    ControlToValidate="Username"

    You  are showing it next to a TextBox with an ID of "modeltext".

    Friday, May 1, 2020 10:05 PM
  • User1535942433 posted

    Hi Donald416,

    Accroding to your description and codes,as far as I think,if you want to add a Required Validation  to your textboxes,I suggest you could use RequiredFieldValidator control or javascript validator event.

    Note:RequiredFieldValidator control's ControlToValidate must is the id of  textbox you need to be validated.

    More details,you could refer to below codes:

    <head runat="server">
         <meta charset="utf-8"/>
        <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
        <meta name="viewport" content="width=device-width, initial-scale=1"/>
        <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
        <title>Joscheck Report</title>
        <link href="Content/bootstrap.min.css" rel="stylesheet" />
        <!-- Bootstrap -->
    </head>
    <body>
        <form id="form1" runat="server">
    <div>
            <div class="navbar navbar-default navbar-inverse navbar-fixed-top" role="navigation" style="background-color:#200662; font-family:Nunito;">
            <div class="container">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse" style="background-color:#200662;color:white">
                        <span class="sr-only">Toggle Navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a class="navbar-brand" href="Homepage.aspx"></a>
                </div>
                <div class="navbar-collapse collapse">
                    <ul class="nav navbar-nav navbar-right">
                        <li><a href="Homepage.aspx" style="color: #FFFFFF">Home</a></li>
                        <li><a href="About.aspx" style="color: #FFFFFF">About Us</a></li>
                        <li><a href="Searchweb.aspx"style="color: #FFFFFF">Search</a></li>
                    </ul>
                </div>
            </div>
        </div>
        </div>
            <div class="container">
                        <h1 style="color: #200662; margin-top: 70px; font-family:St Ryde; font-size: xx-large">Vehicle Report</h1>
                        <p>
                            <i style="color: black; font-family:Tombouctou DEMO; font-size: large; font-style: normal">Let us know of any Car theft by Reporting</i>
                        </p>
                <hr/>
                    </div>
    
                   <!--Report start-->
            <br/>
             <div class="container" style="margin-top:10px;">
                <div class="form-horizontal">
                    <div class="page">
    
                            <div class="form-group">
                                <div class="col-xs-11">
                                    <asp:Label ID="Label1" runat="server" Font-Bold="true" CssClass="col-md-2 control-label" Text="Full Name"></asp:Label>
                                    <div class="col-md-3">
                                        <asp:TextBox ID="Nametext" CssClass="form-control" runat="server" Width="300px" placeholder="Full Name"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="*Name" ControlToValidate="Nametext" ForeColor="Red"></asp:RequiredFieldValidator>
                                    </div>
                                </div>
                            </div>
    
                         <div class="form-group">
                            <div class="col-xs-11">
                                <asp:Label ID="Label4" runat="server" Font-Bold="true" CssClass="col-md-2 control-label" Text="Phone Number"></asp:Label>
                                <div class="col-md-3">
                                    <asp:TextBox ID="phonetext" CssClass="form-control" runat="server" Width="300px" placeholder="Phone Number"></asp:TextBox>
                                </div>
                            </div>
                        </div>
    
                        <div class="form-group">
                            <div class="col-xs-11">
                                <asp:Label ID="Label2" runat="server" Font-Bold="true" CssClass="col-md-2 control-label" Text="VIN/Chasis Number"></asp:Label>
                                <div class="col-md-3">
                                    <asp:TextBox ID="Chasis" CssClass="form-control" runat="server" Width="300px" placeholder="VIN/Chasis Number"></asp:TextBox>
                                </div>
                            </div>
                        </div>
    
                        <div class="form-group">
                            <div class="col-xs-11">
                                <asp:Label ID="Label7" runat="server" Font-Bold="true" CssClass="col-md-2 control-label" Text="Confirm VIN/Chasis Number"></asp:Label>
                                <div class="col-md-3">
                                    <asp:TextBox ID="Chasis2" CssClass="form-control" runat="server" Width="300px" placeholder="Re-enter VIN/Chasis Number"></asp:TextBox>
                                </div>
                            </div>
                        </div>
    
                        <div class="form-group">
                            <div class="col-xs-11">
                                <asp:Label ID="Label3" runat="server" Font-Bold="true" CssClass="col-md-2 control-label" Text="Type of Vehicle"></asp:Label>
                                <div class="col-md-3">
                                    <asp:TextBox ID="modeltext" CssClass="form-control" runat="server" Width="300px" placeholder="Vehicle Type E.g Honda Civic"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidatorUsername" CssClass="text-danger" runat="server" ErrorMessage="Username Field is Required!" ControlToValidate="modeltext"></asp:RequiredFieldValidator>
                                </div>
                            </div>
                        </div>
    
                        <div class="form-group">
                            <div class="col-xs-11">
                                <asp:Label ID="Label5" runat="server" Font-Bold="true" CssClass="col-md-2 control-label" Text="E-mail Address"></asp:Label>
                                <div class="col-md-3">
                                    <asp:TextBox ID="mailtext" CssClass="form-control" runat="server" Width="300px" placeholder="E-mail"></asp:TextBox>
                                </div>
                            </div>
                        </div>
    
                        <div class="form-group">
                            <div class="col-xs-11">
                                <asp:Label ID="Label8" runat="server" Font-Bold="true" CssClass="col-md-2 control-label" Text="Date Stolen"></asp:Label>
                                <div class="col-md-3">
                                    <asp:TextBox ID="Dat" CssClass="form-control" runat="server" Width="300px" height="35px" type="date"></asp:TextBox>
                                </div>
                            </div>
                        </div>
    
                        <div class="form-group">
                            <div class="col-xs-11">
                                <asp:Label ID="Label6" runat="server" Font-Bold="true" CssClass="col-md-2 control-label" Text="Location"></asp:Label>
                                <div class="col-md-3">
                                     <asp:TextBox ID="Location" CssClass="form-control" runat="server" Width="300px" placeholder="Location Stolen"></asp:TextBox>
                                </div>
                            </div>
                        </div>
    
                        <div class="form-group">
                            <div class="col-md-2"></div>
                            <div class="col-md-6">
                                    <asp:Button ID="btnreg" runat="server" Text="Report Car Theft" Font-Size="Larger" margin-left="100px" class="btn btn-success" Width="295px" />
                                    <br />
                                    <asp:Label ID="Reportlabel" runat="server" Font-Bold="True" Font-Italic="True" Font-Size="Medium" ForeColor="#000099"></asp:Label>
                                <br />
                                <asp:Label ID="Errorlabel" runat="server"></asp:Label>
                                <br />
                                <br />
                            </div>
                        </div>
                    </div>
                </div>
            </div>
    
             <hr /><footer class="container navbar-fixed-bottom" style="background-color:black; width:auto; height:auto;">
                    <p class="pull-right" style="color: white;"><a href="#">Back to Top</a></p>
                    <p style="color: white;">Copyright &copy; 2018 Doxtrak Tech. All Rights Reserved. &middot; <a href="Homepage.aspx">Home</a> &middot; <a href="#">About Us</a> &middot; <a href="#">Contact</a> &middot</p>
            </footer>
        </form>
         <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
        <!-- Include all compiled plugins (below), or include individual files as needed -->
        <script src="Scripts/bootstrap.min.js"></script>
    </body>

    Result:

    More details,you could refer to below article:

    https://docs.microsoft.com/en-us/dotnet/api/system.web.ui.webcontrols.requiredfieldvalidator?view=netframework-4.8

    Best regards,

    Yijing Sun

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, May 4, 2020 2:47 AM