<asp:DataList ID="dlBrands" runat="server" onitemcommand="dlBrands_ItemCommand"> <ItemTemplate> <asp:Image ID="imgBrandImages" runat="server" Height="100px" Width="200px" ImageUrl='<%#Bind("Name","~//UploadedFiles/{0}") %>' /> </ItemTemplate> </asp:DataList>
<asp:ImageButton ID="imgbtnView" runat="server" ImageUrl="images/add.png" onclick="imgbtnView_Click"/>
string filename = Path.GetFileName(upBrandImages.PostedFile.FileName); if (filename !="") { upBrandImages.SaveAs(Server.MapPath("~//UploadedFiles//" + filename)); BindDataList(); } else { Response.Write("Please Select Image"); }
<asp:FileUpload ID="upBrandImages" runat="server" />
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)