Dmitry Guly Dmitry Guly - 1 month ago 16
ASP.NET (C#) Question

Modal Bootstrap in ASP web forms

I have a problem on my Bootstrap Modal and Button ASP. This my modal window:

enter image description here.

There is

FileUpload
with style

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


When I clicking button
Save
:

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


and again calling my modal
Launch demo modal
, my style
FileUpload
reset:

enter image description here.

Answer
 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>