Hello all!

Below is my code to give you an idea as to what I would like to do.

Partial Class OLATool
    Inherits System.Web.UI.Page

    Protected Sub SqlDataSource1_Selecting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceSelectingEventArgs) Handles SqlDataSource1.Selecting

    End Sub

    Protected Sub OLATool_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

End Class

Below is my .ASPX file

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="OLATool.aspx.vb" Inherits="OLATool" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <style type="text/css">
            font-family: Arial, Helvetica, sans-serif;
            font-size: small;
            color: #FF0000;
            font-weight: bold;
    <form id="form1" runat="server">
    <span class="style1">Sub case #</span>
    <asp:TextBox ID="txtSubcaseNumber" runat="server"></asp:TextBox>
        <asp:DataList ID="DataList1" runat="server" DataKeyField="Owner" 
            style="font-family: Arial, Helvetica, sans-serif; font-size: small">
                Sub Case Owner:
                <asp:Label ID="OwnerLabel" runat="server" Text='<%# Eval("Owner") %>' />
                <br />
                <asp:Label ID="DepartmentLabel" runat="server" 
                    Text='<%# Eval("Department") %>' />
                <br />
                <asp:Label ID="WorkgroupLabel" runat="server" Text='<%# Eval("Workgroup") %>' />
                <br />
                <asp:Label ID="ProductLabel" runat="server" Text='<%# Eval("Product") %>' />
                <br />
                <asp:Label ID="PriorityLabel" runat="server" Text='<%# Eval("Priority") %>' />
                <br />
                <asp:Label ID="SeverityLabel" runat="server" Text='<%# Eval("Severity") %>' />
                <br />
                <asp:Label ID="CreatedLabel" runat="server" Text='<%# Eval("Created") %>' />
                <br />
                <asp:Label ID="AgeLabel" runat="server" Text='<%# Eval("Age") %>' />
                <br />
                <asp:Label ID="typeLabel" runat="server" Text='<%# Eval("type") %>' />
                <br />
                <asp:Label ID="OLALabel" runat="server" Text='<%# Eval("OLA") %>' />
                <br />
                <br />
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:CCTConnectionString %>" 
        SelectCommand="GetOLA" SelectCommandType="StoredProcedure">
            <asp:ControlParameter ControlID="txtSubcaseNumber" Name="SubcaseNumber" 
                PropertyName="Text" Type="String" />

What I would like to do is, if AgeLabel is greater than OLALabel - have a message that says "In SLA" or "Out of SLA" If the AgeLabel is lower the OLA Label.
I figured this would be quick for one of you experts around here, Thanks!!


try like this

create a label below u r code

and display the message as follows

lblmsg.text='<%# (Eval("Age") >Eval("OLA") ) ? "In SLA" : "Out of SLA" %>'