Azm Amn

Azm Amn

  • NA
  • 108
  • 16.8k

Upload image and save in database

Aug 1 2015 10:01 PM
I want to upload the data and it should be saved in the database. I havent done anything in the back code. My DB attributes are: Judgement_ID (varchar (50) not Null), Judgement ( image datatype Not Null),JudgementAppeal_ID varchar (50) Allow Null, AppealedJudgement(image) Allow NuLL
 
Design Code:
<body> 
<h1 style="text-align: center">Create Court Judgement</h1>
<form id="form1" runat="server">
<div style="text-align: center">
Judgement ID:&nbsp; <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<br />
<br />
Judgement:&nbsp;
<asp:FileUpload ID="FileUpload1" runat="server" />
<br />
<br />
Judgement Appeal ID:&nbsp;
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
<br />
<br />
Appealed Judgement:&nbsp;
<asp:FileUpload ID="FileUpload2" runat="server" />
<br />
<br />
<asp:Button ID="Button1" runat="server" Text="Save" />
&nbsp;
<asp:Button ID="Button2" runat="server" Text="Back" />
</div>
</form>
 
Please help i need the image that is uploaded to be saved in the DB.  must be able to upload data on both file uploads and save. It would be kind enough if it is possible to give me the code using my parameters and attributes.

Answers (1)