I have a WebImageViewer control inside of a WARP panel inside of a splitter pane. I have the image viewer wired to handle the OnSelectedIndexChanged event, but when this event fires the images are removed from the viewer. Is there some setting I need to set on the image viewer to allow it to persist the image data between async postbacks?
Here is the markup:
<
ig:WebSplitter ID="split_PageLayout" runat="server" Width="995px" Height="476px">
<Panes>
<ig:SplitterPane runat="server" BackColor="White" Size="250px" CollapsedDirection="NextPane">
<Template>
</Template>
</ig:SplitterPane>
<ig:SplitterPane runat="server" BackColor="White" Size="750px">
<igmisc:WebAsyncRefreshPanel ID="pnl_Files" runat="server" LinkedRefreshControlID="pnl_Folders">
<ig:WebImageViewer ID="ivw_GalleryThumbViewer" runat="server" Width="100%" ScrollAnimations-Type="NextItem" OnSelectedIndexChanged="ivw_GalleryThumbViewer_SelectedIndexChanged">
</ig:WebImageViewer>
</igmisc:WebAsyncRefreshPanel>
</Panes>
</ig:WebSplitter>
Here is the code behind:
protected
void Page_Load(object sender, EventArgs e)
{
// Load ImageItems into Image Viewer using custom Data Access Layer
}
void ivw_GalleryThumbViewer_SelectedIndexChanged(object sender, ImageItemEventArgs e) { }
I have WebAsyncRefreshPanel in my webpage. We are currently loading link buttons dynamically into panel. When user clicks on linkbutton corresponding document gets downloaded.docLink.Attributes.Add("onClick", "window.location = 'openFile.aspx?document=" + docId + "'");
But after this round trip to openfile.aspx, data inside WebAsyncRefreshPanel is getting lost.We found a work around to rebind warp on page load, but this doesn't sounds good. Do u have a better solution?
WebImageViewer and WebSplitter are built atop the ASP.NET AJAX Extensions framework. WARP is not compatible with controls that register their associated JavaScript on the server, including all controls built atop this framework.
I recommend using an UpdatePanel instead of WARP in this scenario.