摘要:public static class HttpRequestPost{ /// <summary> /// 向指定的URL地址发起一个POST请求,同时可以上传一些数据项。 /// </summary> /// <param name="url">要请求的URL地址</param> /// <param name="keyvalues">要上传的数据项</param> /// <param name="encoding">发送,接收的字符编码方式&l
阅读全文
摘要:/对称加密 DESCryptoServiceProvider dessp = new DESCryptoServiceProvider(); dessp.GenerateIV(); byte[] IV = dessp.IV;//解密用 dessp.GenerateKey(); byte[] Key = dessp.Key;//解密用 MemoryStream myStream=new MemoryStream(); string myID =...
阅读全文
摘要:View Code public class StartupFoldersConfigSection : ConfigurationSection{ [ConfigurationProperty("Folders")] public FoldersCollection FolderItems { get { return ((FoldersCollection)(base["Folders"])); } }}[ConfigurationCollection(typeof(FolderElement))]public class FoldersCollec
阅读全文
摘要:private void Form1_Paint(object sender, PaintEventArgs e) { BufferedGraphics bg; Graphics g; BufferedGraphicsContext bc = BufferedGraphicsManager.Current; bg = bc.Allocate(this.CreateGraphics(), this.DisplayRectangle);//Graphics存入缓存区 g =...
阅读全文
摘要:<system.web> <webServices> <protocols> <add name="HttpGet"/> <add name="HttpPost"/> </protocols> </webServices> </system.web>
阅读全文
摘要:如果异步传的值是一个引用类型 那传的格式userInfo参数名称"{userInfo:{UserID:'104',TrueName:'fssss',Sex:'1',Birthday:'d',Native:'fssssss',Height:'d',Weight:'d',GraduatedSchool:'ds',Degree:'d',Profession:'',Face:'ds',QQMSN:'d'
阅读全文
摘要:页面错误的跳转代码 <system.web><customErrors defaultRedirect="/Manage/Error/Error404.aspx" mode="On"> <!--发生500错误,跳转到InternalError.htm页面--> <error statusCode="500" redirect="/Manage/Error/Error500.aspx"/> <!--发生400错误,跳转到400.htm页面--> <er
阅读全文
摘要:/要引用2个dll(.NETFramework\v4.0\Microsoft.CSharp.dll;.NETFramework\v4.0\System.Web.DataVisualization.dll) Chart Chart1 = new Chart(); Color[] color = { Color.Firebrick, Color.Gold, Color.DodgerBlue, Color.OliveDrab, Color.RosyBrown, Color.Coral, Color.HotPink, Color.Goldenrod, Color.Navaj...
阅读全文
摘要:XElement xml = XElement.Load(Page.MapPath("../Resume/TempImages/test.xml")); var con = xml.Elements().Where(e => e.Attribute("TestReport").Value.ToString() == xy).First().Value;
阅读全文
摘要:要用execl2003组件才可以 Microsoft.Office.Interop.Excel.Application execl = new Microsoft.Office.Interop.Excel.Application(); Workbook book = execl.Workbooks.Add(true); Worksheet sheet = (Worksheet)book.Worksheets["sheet1"];这个方法如果不跨行 跨列为0就可以。View Code /// <summary> /// ...
阅读全文
摘要:tempsql= insert into [sheet1$](打款日期,办事处,领款人,卡号,卡用户,金额,保证金,备注) values('{0}','{1}','{2}','{3}','{4}','{5}','','');//多条分号隔开(;)View Code /// <summary> /// /// </summary> /// <param name="OldPath">execl模板</para
阅读全文
摘要:http://www.w3school.com.cn/tiy/t.asp?f=jquery_slide_toggle(自动切换隐藏)http://www.w3school.com.cn/tiy/t.asp?f=jquery_hide_explanations(设为隐藏)http://www.w3school.com.cn/tiy/t.asp?f=jquery_animation(动态扩展)http://www.w3school.com.cn/tiy/t.asp?f=jquery_fadeto(渐变)
阅读全文