我使用Button进行一些触发,使用触发但无法点击,我删除触发器,按钮工作但页面标题未显示 看起来吃了这个
RequiresPointer = RequiresPointer.Never;
<asp:ImageButton ID="btnOderhelp" runat="server" OnClick="btnOderhelp_Click" ForeColor="White" ToolTip="Help" Height="25px" ImageUrl="~/img/help.png" />
我尝试使用<div class="col-md-12">
<div class="col-sm-2">
<asp:Label ID="Label2" runat="server" Text="Order No" Font-Bold="True" Font-Names="arial, helvetica, sans-serif" Font-Size="13px"></asp:Label>
</div>
<div class="col-sm-3">
<asp:TextBox ID="txtoder" MaxLength="15" runat="server" CssClass="form-control" Width="348px" placeholder="Oder Placement No/Style Name"></asp:TextBox>
<asp:HiddenField ID="hdnoder" runat="server"></asp:HiddenField>
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtoder" CssClass="error" ErrorMessage="RequiredFieldValidator" Display="Dynamic" ValidationGroup="save" Font-Size="11px" ForeColor="Red">Order No Required!</asp:RequiredFieldValidator>
</div>
<div class="col-md-1" style="left: 30px;">
<asp:Label ID="Label8" runat="server" ForeColor="Red" Text="*"></asp:Label>
<asp:ImageButton ID="btnOderhelp" runat="server" OnClick="btnOderhelp_Click" ForeColor="White" ToolTip="Help" Height="25px" ImageUrl="~/img/help.png" />
...
</div>
...
</div>
,但它不适用于我,我无法点击按钮。
答案 0 :(得分:0)
<ScriptManager />
EnablePartialRendering="true"
<强>〔实施例强>
<asp:ScriptManager ID="ScriptManager1" EnablePartialRendering="True" runat="server" />
<asp:UpdatePanel ID="UpdatePanel1" ChildrenAsTriggers="true" runat="server">
<ContentTemplate>
<div class="row">
<div class="col-md-12">
<div class="col-sm-2">
<asp:Label ID="Label2" runat="server" Text="Order No" Font-Bold="True" Font-Names="arial, helvetica, sans-serif" Font-Size="13px"></asp:Label>
</div>
<div class="col-sm-3">
<asp:TextBox ID="txtoder" MaxLength="15" runat="server" CssClass="form-control" Width="348px" placeholder="Oder Placement No/Style Name"></asp:TextBox>
<asp:HiddenField ID="hdnoder" runat="server"></asp:HiddenField>
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtoder" CssClass="error" ErrorMessage="RequiredFieldValidator" Display="Dynamic" ValidationGroup="save" Font-Size="11px" ForeColor="Red">Order No Required!</asp:RequiredFieldValidator>
</div>
<div class="col-md-1" style="left: 30px;">
<asp:Label ID="Label8" runat="server" ForeColor="Red" Text="*"></asp:Label>
</div>
</div>
</div>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="btnOderhelp" />
</Triggers>
</asp:UpdatePanel>
<asp:ImageButton ID="btnOderhelp" runat="server" OnClick="btnOderhelp_Click" ForeColor="White" ToolTip="Help" Height="25px" ImageUrl="~/img/help.png" />
答案 1 :(得分:-1)
请使用ajax updatepanel或在aspx页面上设置EnableEventValidation =“false”
<div class="modal fade" role="dialog" id="eventdis" data-backdrop="static" data-keyboard="false">
<div class="modal-dialog">
<asp:UpdatePanel ID="updatedes" runat="server" ChildrenAsTriggers="false" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">Edit Voter Profile</h4>
</div>
<div class="modal-body">
<p>Mobile Number</p>
<asp:TextBox ID="txt_editVmobile" runat="server" CssClass="form-control placeholder-no-fix" placeholder="Mobile Number" autocomplete="off"></asp:TextBox>
<p>Status</p>
<asp:DropDownList ID="drp_edits" runat="server" CssClass="form-control"></asp:DropDownList>
<p>Caste</p>
<asp:DropDownList ID="drp_editc" runat="server" CssClass="form-control"></asp:DropDownList>
</div>
<div class="modal-footer">
<button data-dismiss="modal" class="btn btn-primary" type="button">Cancel</button>
<asp:Button ID="btn_EditVoterProfile" runat="server" Text="Submit" OnClientClick="return hindModel();" CssClass="btn btn-danger" OnClick="btn_EditVoterProfile_Click" />
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>