if it is a web application ,maybe you should calculate to ues ajax technology er...use include
my english is very bad!
if it is a web application ,maybe you should calculate to ues ajax technology er...use include
my english is very bad!
maybe he or she is a churchman ?haha
my english is very bad!
which allows you to upload the file format?
my english is very bad!
you should specify the database ,user ,password in you contention string
my english is very bad!
yeah,I know that I did not optimize my code,but I do not think that it is complicated and unnecessarily . Thanks for your advice ,can you tell me ,if I want use the openxml ,since version 2000,all have this function itself? if you say yeah,I would be very happay, opposition,if need me install it,I do not think so! and if anybody need my help,please give me message
my english is very bad!
I have encountered similarly problem ,please give me some code for this question
my english is very bad!
hi,I have write a similar code .I hope my code can help you! using System; using System.IO; using System.Xml; using System.Collections; using System.Data.SqlClient; using System.Data; using System.Configuration; namespace InsertSql { /// <summary> /// Class1 ?????? /// </summary> class Class1 { private static SqlConnection myConnection; public static ArrayList myfilelist = new ArrayList(); //public static ArrayList DataType = new ArrayList(); public static int insercount; public static int lostnum; public static string TableName = ConfigurationSettings.AppSettings["TableName"].ToString(); /// <summary> /// ?????????? /// </summary> [STAThread] static void Main(string[] args) { string filepath; filepath = Console.ReadLine(); //filepath = @"f:\result\test\"; DirectoryInfo di = new DirectoryInfo (@filepath); CheckDir(di); Console.WriteLine("????????,?????????y/n"); string flag =Console.ReadLine(); if(flag.ToLower().Equals("y")) { //GetArrayList(DataType,string appname) IEnumerator filelist = myfilelist.GetEnumerator(); while(filelist.MoveNext()) { ReadXml(filelist.Current.ToString()); } Console.ReadLine(); } Console.WriteLine("????????,??????"+insercount+"???,????"+lostnum+"???!"); Console.ReadLine(); } public static ArrayList GetArrayList(ArrayList arrname,string appname) { string Datafile = ConfigurationSettings.AppSettings[appname].ToString(); string[] temp = Datafile.Split('|'); for(int i=0;i<temp.Length;i++) { arrname.Add(temp[i].ToString()); } return arrname; } public static void ReadXml(string filepath) { ArrayList XmlNodeNamelist = new ArrayList(); XmlDocument doc = new XmlDocument(); try { doc.Load(filepath); if(doc.HasChildNodes) { XmlNodeList mylist = doc.GetElementsByTagName("item"); GetArrayList(XmlNodeNamelist,"XmlNodeName"); string[] datalist = new string[XmlNodeNamelist.Count]; foreach(XmlNode personElement in mylist) { for(int i=0;i<XmlNodeNamelist.Count;i++) { if(XmlNodeNamelist[i].ToString()==personElement.Attributes["name"].Value) { datalist[i]=personElement.FirstChild.Value; } } } InsertDate(datalist,filepath); } } catch(Exception xmlerr) { Console.WriteLine(xmlerr); } } private static void InsertDate(string[] dat
to shah_tech: you can use a page(loginout.aspx) for clear session,after,let the page redirect to the login.aspx loginout.aspx'code like this: private void Page_Load(Object sender,EventArgs e) { if(!Page.IsPostBack) { Session.Clear(); Response.Write(""); } } I hope this can help you!:^)
my english is very bad!
if you use the session,after check logout,you should remove the session,and you should check the session in the loginpage.
my english is very bad!