页面网址:http://advancedmedia.co.il/data.aspx
代码:
<asp:Content ID="Content2" ContentPlaceHolderID="page_content_cp" Runat="Server">
<asp:UpdatePanel runat="server" ID="UP1" UpdateMode="Conditional">
<ContentTemplate>
<section id="page_section">
<div class="data_top">
<ul class="bxslider">
<asp:ListView ID="LV_slider" runat="server" DataSourceID="**">
<ItemTemplate>
<li>
<asp:Image ID="Image11" ImageUrl='<%#XPath("big_image_url") %>' AlternateText="slider" runat="server" />
</li>
</ItemTemplate>
</asp:ListView>
</ul>
</div>
<div class="shaddow"></div>
<div class="data_bottom">
<asp:ListView runat="server" ID="LV_data_bottom" DataSourceID="**">
<ItemTemplate>
<div style="display:inline;">
<asp:LinkButton runat="server" CommandArgument='<%#XPath("big_image_url") %>' ID="LB_thumb" OnClick="lb_thumb1" ><asp:Image runat="server" ID="IMG_img1" ImageUrl='<%#XPath("small_image_url") %>' />
<asp:Label runat="server" CssClass="title" ID="bottom_label" Text='<%#XPath("title") %>'></asp:Label></asp:LinkButton>
</div>
</ItemTemplate>
</asp:ListView>
</div>
</section>
</ContentTemplate>
</asp:UpdatePanel>
<asp:XmlDataSource ID="**" runat="server"
DataFile="~/***/***" XPath="/Data/**/**">
</asp:XmlDataSource>
</asp:Content>
单击拇指“跳转”页面。
我不希望页面在点击拇指后会“跳转” /“刷新”。我怎样才能做到这一点?也许我在updatepanel的位置上不对吗?
您总是可以使用updatepanel和microsoft ajax完成它,但是有更好,更轻量的替代方法。单击缩略图时,使用jquery在顶部交换主图像,而无需刷新页面。
我不确定您在这里遇到什么问题,但是如果要将更新面板分成两个,可以这样做。
列表视图页面中使用过的AutoPostBack="false"
无法刷新..或使用javascript更改图像
放入ScriptManager
。
您尝试更改以下内容
在LinkButton上设置ClientIDMode = Auto。
一切似乎都正确。这是“更新”面板的示例。
我已经在VS2013 asp.net 4.5框架中开发了我的Web应用程序。我使用过更新面板,该源在我的开发PC中工作正常。但在我的生产服务器上不起作用。