Hello there,
I'm working with employee registration form in asp.net c#.
I'm having a FileUpload control where i can select multiple files.
I need to save multiple images in server folder and save multiple images path in dedicates columns of database table MySql.
Any help really appreciated.
database table MySql output expected
| pID | FileUpload1 | FileUpload2 | FileUpload3 |
|-----|-------------|-------------|-------------|
| 1 | img1012345 | img20123456 | img30123456 |
.aspx markup
<asp:FileUpload ID="FileUpload1" runat="server" BackColor="Yellow" accept=".jpg" />
<asp:FileUpload ID="FileUpload2" runat="server" BackColor="Yellow" accept=".jpg" />
<asp:FileUpload ID="FileUpload3" runat="server" BackColor="Yellow" accept=".jpg" />
<asp:ImageButton ID="imgsave" runat="server" OnClick="imgsave_Click"
ImageUrl="/Img/save_button.gif" ToolTip="Save img"
OnClientClick="if (!confirm('Confirm?')) return false;" />
.cs code-behind
protected void imgsave_Click(object sender, ImageClickEventArgs e)
{
try
{
}
catch (Exception ex)
{
HttpContext.Current.Response.Write("<script>alert('" +
HttpContext.Current.Server.HtmlEncode(ex.Message) + "')</script>");
}
}