0

hi

this is prob a very simple question. I have a website that that is acting as a monitoring program. On the homepage i need to display

Currently monitoring $$ servers

Where $$ is a select count statement from a SQL server db. My question is how do I do it I have set up the SQL data connection and it contains the needed select statement but how do i access the result. Is it in a variable code below:

<%@ Page Language="C#" MasterPageFile="~/Master1.master" AutoEventWireup="true" CodeFile="Home.aspx.cs" Inherits="Home" Title="Site Health Home Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <h1 style="text-align: center">
        Welcome To The Site Health Application</h1>
    <p>
        You are currenlty monitoring  Solaris Servers<asp:SqlDataSource 
            ID="SqlDataSource2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:sitehealthConnectionString %>" 
            SelectCommand="select count (*) from T_Servers"></asp:SqlDataSource>
    </p>
</asp:Content>
3
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by mail2saion
Featured Replies
  • HI, Label controls don't have any smart tag that allows you to select a data source. Yes you can do it. But you have to apply the tricks something different. To read more you can visit: [url]http://www.mikesdotnetting.com/Article.aspx?ArticleID=64[/url] Read More

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.