| | |
how should i do it?
Please support our ASP.NET advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Feb 2006
Posts: 399
Reputation:
Solved Threads: 14
Hi,
Im creating a website that will be used to monitor servers, the user can add and remove servers and the servers list will be constantly chaning.
I need to create a generic page to display the monitoring results that will adapt depending on which server the user selects. The graphs and results dispalyed will always be the same however the data will change depending on which server is selected. How would i go about doing this and is there any good examples online?
Would i need to create new pages as servers are loaded? or could i use a master page that changes depending on server?
Im creating a website that will be used to monitor servers, the user can add and remove servers and the servers list will be constantly chaning.
I need to create a generic page to display the monitoring results that will adapt depending on which server the user selects. The graphs and results dispalyed will always be the same however the data will change depending on which server is selected. How would i go about doing this and is there any good examples online?
Would i need to create new pages as servers are loaded? or could i use a master page that changes depending on server?
If my post helped add to my rep!
FOR REFRESH YOU CAN USE AJAX. TO LEARN MORE ON THIS GO TO asp.net learn section. Server means what? Just input & then save??? Need to know details. For graph you can use fusion chart which is free.
MARK AS SOLVED if its help you.
REGARDS
MCTS - Shawpnendu bikash maloroy
http://shawpnendu.blogspot.com
REGARDS
MCTS - Shawpnendu bikash maloroy
http://shawpnendu.blogspot.com
•
•
Join Date: Feb 2006
Posts: 399
Reputation:
Solved Threads: 14
hi,
I mean like a windows server or unix server basically monitoring computers and I would like to have one template that could be used for every server, the data about each server is stored in a sql database so when the user selects say server1 it will load the template with all the information about server1, but if they chose server2 then it will load all the information about server2. I need to know whether this should be done with a master page i.e create the template then each time a new server is added it will create a page based on that template or is there another way which would be better?
I mean like a windows server or unix server basically monitoring computers and I would like to have one template that could be used for every server, the data about each server is stored in a sql database so when the user selects say server1 it will load the template with all the information about server1, but if they chose server2 then it will load all the information about server2. I need to know whether this should be done with a master page i.e create the template then each time a new server is added it will create a page based on that template or is there another way which would be better?
If my post helped add to my rep!
Basically MASTER page is used for a common header, footer or left menu purpose. According to your why you think complex. Its easy i think. You can design an aspx page which will be the master page. Then design child page.
In master page you will show the list of available/active servers in a GridView.
When user click on a row then redirect to the child page by the selected server id. In child page select child details by a select statement where serverid=querystring value.
Let me know if you cant understand.
In master page you will show the list of available/active servers in a GridView.
When user click on a row then redirect to the child page by the selected server id. In child page select child details by a select statement where serverid=querystring value.
Let me know if you cant understand.
MARK AS SOLVED if its help you.
REGARDS
MCTS - Shawpnendu bikash maloroy
http://shawpnendu.blogspot.com
REGARDS
MCTS - Shawpnendu bikash maloroy
http://shawpnendu.blogspot.com
•
•
Join Date: Feb 2006
Posts: 399
Reputation:
Solved Threads: 14
hi,
That is exactly how i have done it so far. Have a sql query on my homepage which returns a list of the servers that the program is monitoring. I have selected the option make them selectable and would like it to take the user to a page depending on which is selected i have done it using gridview code below, however when they are selected nothing happens do i need to put something in the code file to make this happen? are there any good examples
That is exactly how i have done it so far. Have a sql query on my homepage which returns a list of the servers that the program is monitoring. I have selected the option make them selectable and would like it to take the user to a page depending on which is selected i have done it using gridview code below, however when they are selected nothing happens do i need to put something in the code file to make this happen? are there any good examples
ASP.NET Syntax (Toggle Plain Text)
<asp:GridView ID="ListOfServers" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" BorderStyle="Solid" BorderWidth="2px" CaptionAlign="Bottom" CellPadding="4" DataKeyNames="ServerID" DataSourceID="SqlDataSource1" Font-Bold="True" Font-Names="Cordia New" Font-Size="Medium" ForeColor="#333333" HorizontalAlign="Center" ToolTip="This table contains the current list of monitored servers." Width="95%"> <RowStyle BackColor="#EFF3FB" /> <Columns> <asp:CommandField ShowSelectButton="True" /> <asp:BoundField DataField="ServerID" HeaderText="ServerID" InsertVisible="False" ReadOnly="True" SortExpression="ServerID" /> <asp:BoundField DataField="HostName" HeaderText="HostName" SortExpression="HostName" /> <asp:BoundField DataField="MachineType" HeaderText="MachineType" SortExpression="MachineType" /> <asp:BoundField DataField="Kernel" HeaderText="Kernel" SortExpression="Kernel" /> <asp:BoundField DataField="SerialNo" HeaderText="SerialNo" SortExpression="SerialNo" /> <asp:BoundField DataField="PrimaryIP" HeaderText="PrimaryIP" SortExpression="PrimaryIP" /> </Columns> <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" /> <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" /> <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> <EditRowStyle BackColor="#2461BF" HorizontalAlign="Center" VerticalAlign="Middle" Wrap="True" /> <AlternatingRowStyle BackColor="White" /> </asp:GridView>
If my post helped add to my rep!
YOU CAN ACHIEVE THIS IN THE FOLLOWING WAY:
ASP.NET Syntax (Toggle Plain Text)
<asp:TemplateField HeaderText="Action"> <ItemTemplate> <asp:Label ID="lblEdit" runat="server" Text='<%# "<a href=frmAgents.aspx?Cmd=EDIT&NavigateId=" + DataBinder.Eval(Container.DataItem, "Id")+ ">Edit</a>"+" | "+ "<a onclick="+ch+"return ConfirmChoice()"+ ch +" href=frmAgents.aspx?Cmd=DELETE&NavigateId=" + DataBinder.Eval(Container.DataItem, "Id")+ ">Delete</a>" %>'></asp:Label> </ItemTemplate> <ItemStyle HorizontalAlign="Center" /> <HeaderStyle HorizontalAlign="Center" /> </asp:TemplateField>
MARK AS SOLVED if its help you.
REGARDS
MCTS - Shawpnendu bikash maloroy
http://shawpnendu.blogspot.com
REGARDS
MCTS - Shawpnendu bikash maloroy
http://shawpnendu.blogspot.com
•
•
Join Date: Feb 2006
Posts: 399
Reputation:
Solved Threads: 14
hi,
Where would I put this code. I put it directly after the code I showed you before but it gave errors, do I need to add new controls to the website first? Errors are as follows:
Complete code for home page
Where would I put this code. I put it directly after the code I showed you before but it gave errors, do I need to add new controls to the website first? Errors are as follows:
ASP.NET Syntax (Toggle Plain Text)
Error 10 'System.Web.UI.Control' does not contain a definition for 'DataItem' and no extension method 'DataItem' accepting a first argument of type 'System.Web.UI.Control' could be found (are you missing a using directive or an assembly reference?) C:\Users\chris\Documents\work\uni\year3\project\website\Home.aspx 54
ASP.NET Syntax (Toggle Plain Text)
<%@ Page Language="C#" MasterPageFile="~/Master1.master" AutoEventWireup="true" CodeFile="Home.aspx.cs" Inherits="Home" Title="Site Health Home Page" %> <%@ MasterType virtualpath="~/Master1.master" %> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <h1 style="text-align: center; color: #FFFFFF;"> <asp:Label ID="CompanyName" runat="server" style="font-size: x-large" Text="Label"></asp:Label> </h1> <p> You are currenlty monitoring <asp:Label ID="serverCount" runat="server" Text="servercount"></asp:Label> Solaris Servers:</p> <p> <asp:GridView ID="ListOfServers" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" BorderStyle="Solid" BorderWidth="2px" CaptionAlign="Bottom" CellPadding="4" DataKeyNames="ServerID" DataSourceID="SqlDataSource1" Font-Bold="True" Font-Names="Cordia New" Font-Size="Medium" ForeColor="#333333" HorizontalAlign="Center" ToolTip="This table contains the current list of monitored servers." Width="95%"> <RowStyle BackColor="#EFF3FB" /> <Columns> <asp:CommandField ShowSelectButton="True" /> <asp:BoundField DataField="ServerID" HeaderText="ServerID" InsertVisible="False" ReadOnly="True" SortExpression="ServerID" /> <asp:BoundField DataField="HostName" HeaderText="HostName" SortExpression="HostName" /> <asp:BoundField DataField="MachineType" HeaderText="MachineType" SortExpression="MachineType" /> <asp:BoundField DataField="Kernel" HeaderText="Kernel" SortExpression="Kernel" /> <asp:BoundField DataField="SerialNo" HeaderText="SerialNo" SortExpression="SerialNo" /> <asp:BoundField DataField="PrimaryIP" HeaderText="PrimaryIP" SortExpression="PrimaryIP" /> </Columns> <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" /> <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" /> <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> <EditRowStyle BackColor="#2461BF" HorizontalAlign="Center" VerticalAlign="Middle" Wrap="True" /> <AlternatingRowStyle BackColor="White" /> </asp:GridView> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:sitehealthConnectionString %>" SelectCommand="SELECT [ServerID], [HostName], [MachineType], [Kernel], [SerialNo], [PrimaryIP] FROM [T_Servers]" onselecting="SqlDataSource1_Selecting"> </asp:SqlDataSource> </p> <asp:TemplateField HeaderText="Action"> <ItemTemplate> <asp:Label ID="lblEdit" runat="server" Text='<%# "<a href=frmAgents.aspx?Cmd=EDIT&NavigateId=" + DataBinder.Eval(Container.DataItem, "Id")+ ">Edit</a>"+" | "+ "<a onclick="+ch+"return ConfirmChoice()"+ ch +" href=frmAgents.aspx?Cmd=DELETE&NavigateId=" + DataBinder.Eval(Container.DataItem, "Id")+ ">Delete</a>" %>'></asp:Label> </ItemTemplate> <ItemStyle HorizontalAlign="Center" /> <HeaderStyle HorizontalAlign="Center" /> </asp:TemplateField> <p> </p> <p> Site Health Service Status: <asp:Label ID="serviceStatusLabel" runat="server" Font-Bold="True" Text="Label" ToolTip="If the service isn't started this application wont work"></asp:Label> <asp:Button ID="StopService" runat="server" Text="Stop Service" onclick="StopService_Click1" /> <asp:Button ID="StartService" runat="server" Text="Start Service" onclick="StartService_Click1" /> </p> <p> </p> <p> Page Refresh Time <asp:DropDownList ID="RefreshTime" runat="server" AppendDataBoundItems="True" AutoPostBack="True" onselectedindexchanged="RefreshTime_SelectedIndexChanged" ToolTip="Sets the refresh time of the current page"> <asp:ListItem Value="10">10 Seconds</asp:ListItem> <asp:ListItem Value="30">30 Seconds</asp:ListItem> <asp:ListItem Value="60">60 Seconds</asp:ListItem> <asp:ListItem Value="300">5 Minutes</asp:ListItem> <asp:ListItem Value="600">10 Minutes</asp:ListItem> <asp:ListItem Value="3">3 seconds</asp:ListItem> <asp:ListItem Value="5">5 seconds</asp:ListItem> </asp:DropDownList> <asp:Label ID="fresh" runat="server" Text="Label"></asp:Label> </p> <p> </p> <p> <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:sitehealthConnectionString %>" DatasourceMode="DataSet" onselecting="SqlDataSource2_Selecting" SelectCommand="SELECT COUNT(*) FROM T_Servers"></asp:SqlDataSource> </p> </asp:Content>
If my post helped add to my rep!
hi,
check this
check this
ASP.NET Syntax (Toggle Plain Text)
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <h1 style="text-align: center; color: #FFFFFF;"> <asp:Label ID="CompanyName" runat="server" style="font-size: x-large" Text="Label"></asp:Label> </h1> <p> You are currenlty monitoring <asp:Label ID="serverCount" runat="server" Text="servercount"></asp:Label> Solaris Servers:</p> <p> <asp:GridView ID="ListOfServers" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" BorderStyle="Solid" BorderWidth="2px" CaptionAlign="Bottom" CellPadding="4" DataKeyNames="ServerID" DataSourceID="SqlDataSource1" Font-Bold="True" Font-Names="Cordia New" Font-Size="Medium" ForeColor="#333333" HorizontalAlign="Center" ToolTip="This table contains the current list of monitored servers." Width="95%"> <RowStyle BackColor="#EFF3FB" /> <Columns> <asp:CommandField ShowSelectButton="True" /> <asp:BoundField DataField="ServerID" HeaderText="ServerID" InsertVisible="False" ReadOnly="True" SortExpression="ServerID" /> <asp:BoundField DataField="HostName" HeaderText="HostName" SortExpression="HostName" /> <asp:BoundField DataField="MachineType" HeaderText="MachineType" SortExpression="MachineType" /> <asp:BoundField DataField="Kernel" HeaderText="Kernel" SortExpression="Kernel" /> <asp:BoundField DataField="SerialNo" HeaderText="SerialNo" SortExpression="SerialNo" /> <asp:BoundField DataField="PrimaryIP" HeaderText="PrimaryIP" SortExpression="PrimaryIP" /> <asp:TemplateField HeaderText="Action"> <ItemTemplate> <asp:Label ID="lblEdit" runat="server" Text='<%# "<a href=frmAgents.aspx?Cmd=EDIT&NavigateId=" + DataBinder.Eval(Container.DataItem, "Id")+ ">Edit</a>"+" | "+ "<a onclick="+ch+"return ConfirmChoice()"+ ch +" href=frmAgents.aspx?Cmd=DELETE&NavigateId=" + DataBinder.Eval(Container.DataItem, "Id")+ ">Delete</a>" %>'></asp:Label> </ItemTemplate> <ItemStyle HorizontalAlign="Center" /> <HeaderStyle HorizontalAlign="Center" /> </asp:TemplateField> </Columns> <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" /> <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" /> <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> <EditRowStyle BackColor="#2461BF" HorizontalAlign="Center" VerticalAlign="Middle" Wrap="True" /> <AlternatingRowStyle BackColor="White" /> </asp:GridView> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:sitehealthConnectionString %>" SelectCommand="SELECT [ServerID], [HostName], [MachineType], [Kernel], [SerialNo], [PrimaryIP] FROM [T_Servers]" onselecting="SqlDataSource1_Selecting"> </asp:SqlDataSource> </p> <p> </p> <p> Site Health Service Status: <asp:Label ID="serviceStatusLabel" runat="server" Font-Bold="True" Text="Label" ToolTip="If the service isn't started this application wont work"></asp:Label> <asp:Button ID="StopService" runat="server" Text="Stop Service" onclick="StopService_Click1" /> <asp:Button ID="StartService" runat="server" Text="Start Service" onclick="StartService_Click1" /> </p> <p> </p> <p> Page Refresh Time <asp:DropDownList ID="RefreshTime" runat="server" AppendDataBoundItems="True" AutoPostBack="True" onselectedindexchanged="RefreshTime_SelectedIndexChanged" ToolTip="Sets the refresh time of the current page"> <asp:ListItem Value="10">10 Seconds</asp:ListItem> <asp:ListItem Value="30">30 Seconds</asp:ListItem> <asp:ListItem Value="60">60 Seconds</asp:ListItem> <asp:ListItem Value="300">5 Minutes</asp:ListItem> <asp:ListItem Value="600">10 Minutes</asp:ListItem> <asp:ListItem Value="3">3 seconds</asp:ListItem> <asp:ListItem Value="5">5 seconds</asp:ListItem> </asp:DropDownList> <asp:Label ID="fresh" runat="server" Text="Label"></asp:Label> </p> <p> </p> <p> <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:sitehealthConnectionString %>" DatasourceMode="DataSet" onselecting="SqlDataSource2_Selecting" SelectCommand="SELECT COUNT(*) FROM T_Servers"></asp:SqlDataSource> </p> </asp:Content>
If u r query is achieved,mark the thread as solved
Live and Let Live
Live and Let Live
![]() |
Other Threads in the ASP.NET Forum
- Previous Thread: Asp.net javascript confirmation box not cancelling
- Next Thread: Update Web.config from windows application
| Thread Tools | Search this Thread |
.net 2.0 3.5 activexcontrol advice ajax alltypeofvideos asp asp.net bc30451 bottomasp.net browser businesslogiclayer button c# c#gridviewcolumn checkbox class click commonfunctions compatible confirmationcodegeneration content contenttype control countryselector courier css database datagrid datagridview datagridviewcheckbox datalist deadlock deployment development dgv dropdownlist dropdownmenu dynamic edit embeddingactivexcontrol expose findcontrol flash flv formatdecimal forms formview gridview homeedition iframe iis javascript jquery list login menu microsoft mono mssql multistepregistration nameisnotdeclared numerical objects order panelmasterpagebuttoncontrols problem ratings rotatepage save schoolproject search security serializesmo.table silverlight smartcard sql sqlserver2005 ssl suse textbox tracking unauthorized validation vb.net video virtualdirectory vista visual-studio visualstudio vs2008 web webarchitecture webdevelopemnt webdevelopment webservice wizard xml youareanotmemberofthedebuggerusers





