Ramco Ramco

Ramco Ramco

  • 443
  • 3.4k
  • 526.9k

Name Validation

May 26 2023 12:48 PM

Hi

  In below code i want Child Name should accept only Alphabets , space , spacebar & .

<div class="card">
    <table class='table table-bordered table-hover' id='tbldata2'>
        <thead>
            <tr>
                <th class='nosort2'>#</th>
                <th>Lead Number</th>
                <th>Lead Date</th>
                <th>Name</th>
                <th>Mobile No</th>
                <th>Child Name</th>
                <th>Child Age</th>
            </tr>
        </thead>
        <tbody>
            <asp:Repeater ID="rptBulkDataLead" runat="server">
                <ItemTemplate>
                    <tr>
                        <td>
                            <asp:HiddenField ID="hdfLeadInputID" runat="server" Value='<%# Eval("LeadID") %>' />
                            <asp:Literal ID="ltrlNum" Text="<%# Convert.ToString(Container.ItemIndex + 1) %>" runat="server"></asp:Literal></td>
                        <td>
                            <asp:Literal ID="ltrlLeadNumber" runat="server" Text='<%# Eval("LeadNumber") %>'></asp:Literal></td>
                        <td>
                            <asp:Literal ID="ltrlDate" runat="server" Text='<%# Eval("LeadDate") %>'></asp:Literal></td>
                        <td>
                            <asp:Literal ID="ltrlName" runat="server" Text='<%# Eval("Name") %>'></asp:Literal></td>
                        <td>
                            <asp:Literal ID="ltrlMobileNo" runat="server" Text='<%# Eval("Mobile") %>'></asp:Literal></td>
                        <td>
                            <asp:TextBox ID="txtChildName" runat="server" class="form-control" Text='<%# Eval("ChildName") %>'></asp:TextBox></td>
                        <td>
                            <asp:TextBox ID="txtChildAge" runat="server" class="form-control" Text='<%# Eval("ChildAge") %>'></asp:TextBox></td>
                    </tr>
                </ItemTemplate>
            </asp:Repeater>
        </tbody>
    </table>
</div>

Thanks


Answers (1)