maxhorizon
New Member
For some reason the update panel is not updating the label or image files... any help would be appreciated. The method is calling and the file upload is occurring.ASP:\[code\]<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpdateTest"> <ContentTemplate> <asp:Label ID ="lblTemp" runat="server">test</asp:Label> <asp:AsyncFileUpload ID="ImageUpload" runat="server" OnUploadedComplete="ImageUpload_UploadedComplete" /> <label>Image</label><br /> <div style="height:60px; padding-bottom:10px; padding-top:5px; "> <div style="width:55px; float:left;margin-right:10px;"> <asp:Image src="http://stackoverflow.com/questions/images/menu_bkg.gif" ID="smallImage" runat="server" Height="60" Width="60" /> </div> </ContentTemplate> </asp:UpdatePanel>\[/code\]C#:\[code\]protected void ImageUpload_UploadedComplete(object sender, AjaxControlToolkit.AsyncFileUploadEventArgs e){ string filename = System.IO.Path.GetFileName(ImageUpload.FileName); ImageUpload.SaveAs(Server.MapPath("../Uploads/") + filename); smallImage.ImageUrl = "../uploads/" + filename; lblTemp.Text = "hellllo"; UpdateTest.Update();}\[/code\]EDIT:I've been running more tests and it seems like perhaps it is an issue with the AsyncFileUpload. I put a button within the UpdatePanel and had it change the image URL and label text. The label text piece works perfectly but when the update() function is called it wipes the asyncfileupload clean. It seems perhaps the lbltemp and smallImage can't be updated?