开发者

Styling breaks after partial post back in update panel. How can i fix this?

开发者 https://www.devze.com 2023-04-06 17:54 出处:网络
I am currently developing a website using ASP.NET and JQuery Mobile. The problem I am running into is that I need to do a popup with information retrieved from a service. Currently I am popul开发者_开

I am currently developing a website using ASP.NET and JQuery Mobile. The problem I am running into is that I need to do a popup with information retrieved from a service. Currently I am popul开发者_开发技巧ating a list view with link buttons (used to retrieve additional info) inside of an update panel. The first time the page loads, all items are styled, but after a partial post back the styling is lost. NOTE: Jquery Mobile automatically styles the controls accordingly.


Try forcing recreation of the styles within the pageLoad function, which is called whenever the page loads (asynchronously or synchronously).

<script type="text/javascript">
    function pageLoad(sender, args) {
        $('#<%= updatePanel1.ClientID %>').trigger('create');
    }      
</script>
0

精彩评论

暂无评论...
验证码 换一张
取 消