I am new to develop a Web Application. please tell me how to upload a image in to our form and at the same time save into the sqlserver table.
thanq in advance
Upload a image
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Shubham SaxenaRank #278 · 8.9K reputationPosted Jul 27, 2012, 11:06 PM EDT
<form id="form1" runat="server">
<div>
<asp:FileUpload ID="fileuploadimages" runat="server" />
<br />
<asp:Button ID="btnSubmit" runat="server" Text="Submit" onclick="btnSubmit_Click" />
div>
.cs file
protected void btnSubmit_Click(object sender, EventArgs e)
{
string filename = Path.GetFileName(fileuploadimages.FileName); ;
//Save images into Images folder
fileuploadimages.SaveAs(Server.MapPath("~/" + filename));
}
Cheers
Santhosh Kumar JayaramanRank #563 · 4.3K reputationPosted Jul 27, 2012, 11:10 PM EDT