Ramco Ramco

Ramco Ramco

  • 441
  • 3.4k
  • 521k

Error message in modal popup

Oct 2 2022 12:56 PM

Hi

I have below code. On Save i want that value in txtRating should be 100 else error message should be displayed

<div id="modal_form_horizontal" class="modal fade">
    <div class="modal-dialog modal-full">
        <div class="modal-content">
            <div class="modal-header bg-info">
                <h5 class="modal-title">Add/Update Record</h5>
                <button type="button" class="close" data-dismiss="modal">&times;</button>&nbsp;
            </div>

            <div class="form-horizontal">
                <div class="modal-body">
                    <div class="row">
                        <div class="col-lg-3">
                            <div class="form-group">
                                <label>Year</label>&nbsp;<span style="color: red">*</span>
                                <asp:DropDownList ID="ddlYear" class="form-control" runat="server" required="true">
                                    <asp:ListItem Value="">Select Year</asp:ListItem>
                                </asp:DropDownList>
                            </div>
                        </div>

                        <div class="col-lg-6">
                            <div class="form-group">
                                <label>Rating</label>
                                <asp:TextBox ID="txtRating" class="form-control num" placeholder="Rating" required="true" runat="server"></asp:TextBox>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="modal-footer">
                    <button type="button" class="btn btn-link" data-dismiss="modal">Close</button>
                    <asp:Button ID="btnSave" runat="server" class="btn bg-primary" Text="Save" OnClick="btnSave_Click" />
                </div>
            </div>
        </div>
    </div>
</div>

Thanks


Answers (1)