Ramco Ramco

Ramco Ramco

  • 443
  • 3.4k
  • 526.8k

Disable Dropdown

Aug 15 2022 3:32 AM

Hi

  I want ddlStatus attribute to be disable when click on Add

<div class="list-icons">
    <button type="button" class="btn bg-info btn-sm" data-toggle="modal" data-backdrop="static" data-keyboard="false" data-target="#modal_form_horizontal" onclick="Save();"><i class="icon-plus22 mr-2"></i>Add Academy</button>
</div>

<div id="modal_form_horizontal" class="modal fade">
    <div class="modal-dialog">
        <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-12">
                            <div class="form-group">
                                <label>Academy Name&nbsp;<span style="color: red">*</span></label>
                                <asp:TextBox ID="txtAcademyName" class="form-control" placeholder="Academy Name" required="true" runat="server"></asp:TextBox>

                            </div>
                        </div>

                        <div class="col-lg-12">
                            <div class="form-group">
                                <label>Status</label>
                                <asp:DropDownList ID="ddlStatus" class="form-control select-search" runat="server">
                                    <asp:ListItem Value="True">Active</asp:ListItem>
                                    <asp:ListItem Value="False">Blocked</asp:ListItem>
                                </asp:DropDownList>
                            </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 (7)