Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SelectPicker in UpdatePanel disappear when Asyncpostback

It's my first question, I'm sorry for my bad English skill.

I have problem about <select class="form-control selectpicker"</select> in UpdatePanel, it disappears when I clicked on a button (button's in a UpdatePanel too)

Here's my aspx code

=========================================================================

========================================================================= Clicked On a button so my <select> is disappear T_T

=========================================================================

It's all my code.

How do I do?

like image 957
Mitr Raiputta Avatar asked Mar 13 '23 22:03

Mitr Raiputta


1 Answers

Was having the same problem and this really helped me out. What you have works great, but this also does the same thing for me without having to use the test function and ScriptManager.

<script>
    function pageLoad() {
        $('.selectpicker').selectpicker(); 
    }
</script>

where I had CssClass="selectpicker" attached to the dropdownlist.

like image 80
Mack Avatar answered Mar 27 '23 07:03

Mack