TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mukesh
NA
228
42.5k
How to Upload Multiple File in Multiple Column In Database
Mar 22 2017 6:09 AM
Hello
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--
This is my Class where I Make Function---
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
Reply
Answers (
1
)
how should i retrieve image in image control using this code
Time Difference