I Want To Know How to Save Multiple File in Multiple Column In Database I give You My Code Below so Please Write Code for Me--
public DataSet InsertRecord(DCI_BAL objprop)
{
CommanFunction cmf = new CommanFunction();
MyConnectionString objcon = new MyConnectionString();
string myconnection = objcon.Constring;
int Querytype = 0; // for Query type i.e. parameter or SP
string SPName = "Proc_Anti_Ragging1";
string Qtype = objprop.Qtype;
string[,] MySPValues = new string[,]
{
{"@Qtype",Qtype},
{"@Year", objprop.Year},
{"@Prospectus_mention_File1",objprop.Prospectus_mention_File1},
{"@Prospectus_mention_File2",objprop.Prospectus_mention_File2},
{"@Prospectus_mention_File3",objprop.Prospectus_mention_File3},
{"@Prospectus_mention_File4",objprop.Prospectus_mention_File4},
{"@Prospectus_mention_File5",objprop.Prospectus_mention_File5}
};
DataSet ds = new DataSet();
ds = cmf.Execute_DSSPQuery(myconnection, Querytype, SPName, MySPValues);
return ds;
}
/////////////////////////////////////////////
protected void btnsubmit_Click1(object sender, EventArgs e)
{
DCI_BAL objDCI_BAL = new DCI_BAL();
DataSet ds = new DataSet();
string collegeId = Session["CollegeId"].ToString();
objDCI_BAL.Qtype = "1";
File();
objDCI_BAL.Prospectus_mention_File1 = flpProspectus.;
objDCI_BAL.Prospectus_mention_File2 = flpProspectus.;
objDCI_BAL.Prospectus_mention_File3 = flpProspectus.;
objDCI_BAL.Prospectus_mention_File4 = flpProspectus.;
objDCI_BAL.Prospectus_mention_File5 = flpProspectus.;
and Hear is File Upload Code-----
public void File()
{
if (flpProspectus.HasFile)
{
string fileExtension = System.IO.Path.GetExtension(flpProspectus.FileName);
int fileSize = flpProspectus.PostedFile.ContentLength;
HttpFileCollection hfc = Request.Files;
for (int i = 0; i < hfc.Count; i++)
{
HttpPostedFile hpf = hfc[i];
if (hpf.ContentLength > 0)
{
hpf.SaveAs(Server.MapPath("~/college/fileupload1/") + System.IO.Path.GetFileName(hpf.FileName));
}
}
}
I want To Know how to Fetch File Name Value in this Id
objDCI_BAL.Prospectus_mention_File1 = flpProspectus.;
objDCI_BAL.Prospectus_mention_File2 = flpProspectus.;
objDCI_BAL.Prospectus_mention_File3 = flpProspectus.;
objDCI_BAL.Prospectus_mention_File4 = flpProspectus.;
objDCI_BAL.Prospectus_mention_File5 = flpProspectus.
Please Reply