开发者

updatepanel not updating html

I've the following code:

<asp:UpdatePanel runat="server" ID="upanel1" >
        <开发者_开发问答ContentTemplate >
            <div id="west" class="x-hide-display" style="background-color: #9eb5bc; height: 100%;">

                <ul id="list_0" runat="server">
                </ul>
            </div>
        </ContentTemplate>
        <Triggers>
        <asp:AsyncPostBackTrigger  ControlID ="btnImages"/>
        </Triggers>
    </asp:UpdatePanel>

and the server code is:

 list_0.InnerHtml = strPhotos.ToString()

My server code is executing but the page's html is not being updated. Please tell me what's wrong


I change my code to ScriptManager.RegisterStartupScript(Me.upanel1, Me.GetType(), "saf", "$get('" + list_0.ClientID + "').innerHTML=""" + strPhotos.ToString() + """", True)

and it worked.


Nothing, as far as I can see.

Anything in your css on the div that could be hiding it? i.e class="x-hide-display" looks suspcious.

Other than, that, are you running your list_0.InnerHtml = strPhotos.ToString() code in a method called by the button's click event?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜