protected void flUpload1_FileReceived(object sender, FileReceivedEventArgs e) { try { string sFileName = e.File.FileName; filecount = imageDetails.Count; Session["Filelist"] = sFileName + ","; } catch (Exception ex) { } }
try { if (Session["Filelist"].ToString() != null && Session["Filelist"].ToString() != "") { string[] sFileArr = Session["Filelist"].ToString().Split(','); XmlDocument XDoc = new XmlDocument(); XmlElement XElemRoot = XDoc.CreateElement("Cars"); XDoc.AppendChild(XElemRoot); for (int i = 0; i < sFileArr.Length; i++) { if (sFileArr[i] != null && sFileArr[i] != "") { XmlElement Xsource = XDoc.CreateElement("CarName"); XElemRoot.AppendChild(Xsource); XmlElement XTemp = XDoc.CreateElement("CarimgLoaction"); XTemp.InnerText = "Images_new\\" + sFileArr[i].ToString(); Xsource.AppendChild(XTemp); } } XDoc.Save(Server.MapPath("ConfigV2") + "\\test.xml"); string sXmlFile = Server.MapPath("ConfigV2") + "\\test.xml"; string sXsltFile = Server.MapPath("ConfigV2/xslt") + "\\cars.xslt"; this.imgcontainer.InnerHtml = Render.RenderXmlFile(sXmlFile, sXsltFile); } } catch (Exception ex) { } finally { Session["Filelist"] = ""; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)