void BindGrid()
{
EventLog aLog=new EventLog();
aLog.Log="Application";
aLog.MachineName=".";LogGrid.DataSource=aLog.Entries;
LogGrid.DataBind();
}
{
EventLog aLog=new EventLog();
aLog.Log="Application";
aLog.MachineName=".";LogGrid.DataSource=aLog.Entries;
LogGrid.DataBind();
}
解决方案 »
- 如何合并相同的时间段??
- 点击GIRDVIEW的排序列头如何让列头变颜色
- 请教ASP.NET 2.0的页面刷新问题
- 如何判断用户操作系统的语言?
- 请教一个关于ASP.NET WEB应用程序和服务不能该名称的问题
- 请问一个很弱的问题 table指定行读取
- 救命呀!DataGrid导出Excel问题........
- 我的表里有一个字段(companyname)放很多公司的名称,公司名称有很多重复的.我想在select的时候,把公司名称想同的只取出一条来.请问sql
- 问个repeater控件中绑定checkbox选定行改变颜色问题
- 在Asp.net中,如何在执行了一段服务器端事件以后再执行客户端的一些事件或者函数,在线等待。
- asp.net 有没有treeview组件。
- 问个比较简单的问题~~连接~~~~马上要用的
{
EventLog aLog=new EventLog();
aLog.Log="Application";
aLog.MachineName=".";//现在这,比如对Index排序,如何写,或给个思路。谢了LogGrid.DataSource=aLog.Entries;
LogGrid.DataBind();
}
{
public int Compare(object x,object y)
{
EventLogEntry a = (EventLogEntry)x;
EventLogEntry b = (EventLogEntry)y; return a.Index - b.Index;
}
}EventLogEntryCollection ec = aLog.Entries;
EventLogEntry[] ees = new EventLogEntry[ec.Count];
ec.CopyTo(ees,0);Array.Sort(ees, new YourCustomComparer());LogGrid.DataSource = ees;