Hi,
I have a bunch of images stored in a List<string> storing the paths of the images which I have obtained using AjaxFileUpload.
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"> </asp:ToolkitScriptManager><asp:ajaxfileupload ID="Ajaxfileupload1" runat="server" OnUploadComplete="FileUploadComplete" OnUploadCompleteAll="FileUploadCompleteAll" EnableViewState="true" ></asp:ajaxfileupload><asp:UpdatePanel ID="_updatePanel" runat="server"><ContentTemplate><asp:PlaceHolder ID="_ph" runat="server"></asp:PlaceHolder></ContentTemplate></asp:UpdatePanel>
In codebehind, I have
protected void FileUploadCompleteAll(object sender, System.EventArgs e) { for (int i = 0; i < fN.Count; i++) { System.Web.UI.WebControls.Image img = new System.Web.UI.WebControls.Image(); img.ImageUrl = fN[i]; _ph.Controls.Add(img); } }
fN is a List<string> and has all the image paths.
Please let me know what wrong I am doing here and a possible fix.
Thank you