摘要:
//写windows日志 if (!System.Diagnostics.EventLog.SourceExists("项目1")) { System.Diagnostics.EventLog.CreateEventSource("项目1", "mylog"); } System.Diagnostics.EventLog eventLog = new System.... 阅读全文
摘要:
1.新建类库,添加引用:System.EnterpriseServices;2.继承ServicedComponent/// <summary> /// Com+ 事件处理 /// </summary> [Transaction(TransactionOption.Required)] public class clsES:ServicedComponent { public void dbAccess(int pid,float nScore) { System.Data.SqlClient.SqlConnection conn; ... 阅读全文
摘要:
protected void Page_Load(object sender, EventArgs e) { Control c = this.ParseControl(" <asp:Button ID='Button1' runat='server' Text='Button' CommandArgument = 'b1' />"); PlaceHolder1.Controls.Add(c); Button b = (Button)FindControl("Button1"); 阅读全文