asp.net中的bootstrap模式框问题 [英] bootstrap modal box issue in asp.net

查看:84
本文介绍了asp.net中的bootstrap模式框问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的页面中创建了一个模态框。在那个模态框中我将gridview控件放在gridview控件中我把复选框。



弹出模态框时当checkcox事件checkedchainged事件触发模态框进入隐形模式时,它显示gridview数据。但我需要它将显示。



我使用此代码< br $>




i created one modal box in my page.in that modal box i put gridview control in that gridview control i put checkbox.

when pop up the modal box it's showing gridview data when the checkcox event "checkedchainged" event fires the modal box goes to invisible mode.but i need it's will be visible.

Iam using this code


<div class="modal hide fade" id="example">
  <div class="modal-header">
    <button type="button" id="b2" class="close" data-dismiss="modal" aria-hidden="true" runat="server">&times;</button>

    <h3>Data Export</h3>
  </div>
  <div class="modal-body">
    <asp:GridView ID="gridlob" runat="server" AutoGenerateColumns="False"

        DataSourceID="SqlDataSource2" width="50%"

          onrowdatabound="gridlob_RowDataBound" >
        <Columns>
            <asp:BoundField DataField="LOUPe_LOB" HeaderText="Line Of Bussiness"

                SortExpression="LOUPe_LOB" />
           <%--<asp:BoundField DataField="GroupFlag" HeaderText="GroupFlag"  ItemStyle-Width="2%"
                SortExpression="GroupFlag" />--%>
               <asp:TemplateField HeaderText="Grouping">

                <%--<ItemTemplate>
    <asp:CheckBox ID="chkReimbursable" runat="server"
       Checked='<%# GetStatus(Eval("GroupFlag")) %>'/>
</ItemTemplate>--%>
              <ItemTemplate>
                <asp:CheckBox ID="chkReimbursable" runat="server" OnCheckedChanged="chkReimbursable_CheckedChanged" AutoPostBack="true"  />
                </ItemTemplate>

               <%-- <ItemTemplate>
                <%# (Boolean.Parse(Eval("GroupFlag").ToString())) ? "Y" : "No"%>
                </ItemTemplate>--%>
                </asp:TemplateField>

        </Columns>

    <EditRowStyle BackColor="#2461BF" />
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#EFF3FB" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#F5F7FB" />
        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
        <SortedDescendingCellStyle BackColor="#E9EBEF" />
        <SortedDescendingHeaderStyle BackColor="#4870BE" />



    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server"

        ConnectionString="<%$ ConnectionStrings:LOUPe_InventoryConnectionString %>"

        SelectCommand="procExcelLOBGroupList" SelectCommandType="StoredProcedure">
    </asp:SqlDataSource>

  </div>
  <div class="modal-footer">
  <a href="#" class="btn btn-primary" data-dismiss="modal">Close</a>

  </div>
</div>







基于bootstrap js函数模态框工作





请与我的问题分享任何信息




based on bootstrap js function the modal box is working


Please share any information to my issue

推荐答案

ConnectionStrings:LOUPe_InventoryConnectionString %> < span class =code-attribute>

< span class =code-attribute> SelectCommand = procExcelLOBGroupList SelectCommandType = StoredProcedure >
< / asp:SqlDataSource >

< / div >
< div class = 模态页脚 >
< a href = class = btn btn -primary data-dismiss = modal > 关闭< / a >

< / div >
< / div >
ConnectionStrings:LOUPe_InventoryConnectionString %>" SelectCommand="procExcelLOBGroupList" SelectCommandType="StoredProcedure"> </asp:SqlDataSource> </div> <div class="modal-footer"> <a href="#" class="btn btn-primary" data-dismiss="modal">Close</a> </div> </div>







基于bootstrap js函数模态框工作





请在我的问题上分享任何信息




based on bootstrap js function the modal box is working


Please share any information to my issue


Checkbox的AutoPostBack = True属性导致页面的完整回发wihcih将模态弹出框的可见性设置为默认是隐藏的。您可以调用
Checkbox's AutoPostBack=True property causing the full postback of the page wihcih sets modal pop box's visiblity to default that is hidden. You can call


('#example')。modal('show')
('#example').modal('show')

来显示弹出窗口。

或者您可以将您的GridView控件放在UpdatePanel中以避免整页回发,这将保留弹出框。

to display the popup.
Or you can put your GridView control in UpdatePanel to avoid full page postback which will retain the pop up box.


这篇关于asp.net中的bootstrap模式框问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆