日期:2013-09-30  浏览次数:20512 次

Call the event viewer control by the tag prefix colon and the class name of eventlog.cs. Note that we set a property from the query string in the code behind file.
Display vw_EventLog.aspx file
< !-- Register the WROXControlLib Assembly  -- >
<%@ Register TagPrefix="CPU" NameSpace="WROXCPUCONSOLE.ControlLib" Assembly="WROXControlLib" %>

<HTML>
  <BODY>
      <!-Call the Event Log Custom Control -->
      <CPU:EventLog id="eventlog1"
               runat="server"
               Machine="machine">
      </CPU:EventLog>
  </BODY>
<HTML>
Code Behind vw_EventLog.aspx.cs file
public class vw_EventLog : System.Web.UI.Page
{
   //Event Log Custom Control
   protected WROXCPUCONSOLE.ControlLib.eventlog eventlog1;

   private void Page_Load(object sender, System.EventArgs e)
   {
      //Set the machine property from the Query String
      eventlog1.Machine = Request.QueryString["machine"].ToString();
   }
}
Event Log Application Available in the Code Download
vw_Process.aspx
Call the process panel control by the tag prefix colon and the class name of process.cs. Note that we set a property from the query string in the code behind file.
Display vw_Process.aspx file
< !-- Register the WROXControlLib Assembly  -- >
<%@ Register TagPrefix="CPU" NameSpace="WROXCPUCONSOLE.ControlLib" Assembly="WROXControlLib" %>

<HTML>
  <BODY>
      <!-Call the Process Custom Control -->
      <CPU:PROCESS id="processes"
               runat="server"
               Machine="machine">
      </CPU:PROCESS>
  </BODY>
<HTML>
Code Behind vw_Process.aspx.cs file :
public class vw_Process : System.Web.UI.Page
{
   //Process Custom Control
   protected WROXCPUCONSOLE.ControlLib.process processes;

   private void Page_Load(object sender, System.EventArgs e)
   {
      //Set the machine property from the Query String
      processes.Machine = Request.QueryString["machine"].ToString();
   }
}
Process Panel Application Available in the Code Download
vw_Service.aspx
Call the service panel control by the tag prefix colon and the class name of services.cs. Note that we set a property from the query string in the code behind file.
Display .aspx file
< !-- Register the WROXControlLib Assembly  -- >
<%@ Register TagPrefix="CPU" NameSpace="WROXCPUCONSOLE.ControlLib" Assembly="WROXControlLib" %>

<HTML>
  <BODY>
      <!-Call the Service Custom Control -->
      <CPU:SERVICES id="service"