ASP Web表单中的模态引导程序

时间:2016-10-07 19:06:34

标签: asp.net webforms modal-dialog bootstrap-modal

我的Bootstrap Modal和Button ASP出了问题。这是我的模态窗口:

enter image description here

FileUpload有风格

<script>
    $(document).ready(function () {
        $('input[type=file]').bootstrapFileInput();
        $('.file-inputs').bootstrapFileInput();
    });
</script>

点击按钮Save时:

<asp:Button Text="Save" UseSubmitBehavior="false" CssClass="btn btn-success"
            OnClick="Unnamed_Click" data-dismiss="modal"  runat="server" />

再次调用我的模态Launch demo modal,我的样式FileUpload重置:

enter image description here

1 个答案:

答案 0 :(得分:0)

 protected void Page_Load(object sender, EventArgs e)
    {
        if(IsPostBack)ScriptManager.RegisterStartupScript(this, GetType(), "123", "GoodsCehck();", true);
    }

   <script>
        GoodsCehck(){
            $(document).ready(function () {
                $('input[type=file]').bootstrapFileInput();
                $('.file-inputs').bootstrapFileInput();
          });
          }
   </script>