随笔分类 -  C#/Asp.Net

摘要:System.Net.Dns.GetHostEntry(Request.ServerVariables["remote_addr"]).HostName; 阅读全文
posted @ 2016-03-09 09:58 facial 阅读(155) 评论(0) 推荐(0)
摘要:add a class: public class ExportAttribute : Attribute { public int FieldOrder { get; set; } public ExportAttribute() { } }add [ExportAttribute(FieldOr 阅读全文
posted @ 2016-02-06 09:04 facial 阅读(989) 评论(0) 推荐(0)
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using ClosedXML.Excel; using Syste 阅读全文
posted @ 2016-02-05 18:10 facial 阅读(298) 评论(0) 推荐(0)
摘要:Reference: http://closedxml.codeplex.com/1. First add refenrenceClosedXML.dllandDocumentFormat.OpenXml.dllto the project.2. add namespace:usingClosedX... 阅读全文
posted @ 2016-01-19 17:26 facial 阅读(557) 评论(0) 推荐(0)
摘要:This ones a little old but was high in the google ranking so I thought I would throw in the answer I found fromChrome, pdf display, Duplicate headers ... 阅读全文
posted @ 2015-11-25 11:25 facial 阅读(257) 评论(0) 推荐(0)
摘要:This example shows how to formatDateTimeusingString.Formatmethod. All formatting can be done also usingDateTime.ToStringmethod.Custom DateTime Formatt... 阅读全文
posted @ 2015-11-20 10:31 facial 阅读(669) 评论(0) 推荐(0)
摘要:I create a very simple website.when I run website from VS2012 ,website easily can get data from SQLSERVER which run on server which is seperate (I mea... 阅读全文
posted @ 2015-11-09 16:56 facial 阅读(695) 评论(0) 推荐(0)
摘要:在c# / ASP.net中我们可以通过使用DataTime这个类来获取当前的时间。通过调用类中的各种方法我们可以获取不同的时间:如:日期(2008-09-04)、时间(12:12:12)、日期+时间(2008-09-04 12:11:10)等。//获取日期+时间DateTime.Now.ToStr... 阅读全文
posted @ 2015-04-03 17:56 facial