View Single Post
  #3 (permalink)  
Old November 17th, 2009, 05:29 PM
kwilliams kwilliams is offline
Banned
Points: 1,561, Level: 16
Points: 1,561, Level: 16 Points: 1,561, Level: 16 Points: 1,561, Level: 16
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2005
Location: , , .
Posts: 317
Thanks: 0
Thanked 0 Times in 0 Posts
Default

- Fuzzy glasses? Nope
- White text on a white background? Nope
- display: none; on the * selector? Nope
- Broken HTML Nope
- Broken CSS? Nope
- Some script that hides or shows stuff? Nope

That's what is strange. Below is the code, but I still don't get why it would show up in the source-code without being on the webpage. I've tested all of the stored procedures on the web page and within SQL Server's Management Studio, and they work great. And as I stated, the data is appearing in the source code.

Thanks.

ASP.NET PAGE:

Code:
   <form id="formEmployees" name="formEmployees" enctype="multipart/form-data" runat="server">
        <div id="viewstatecontent">
        <table width="100%" id="Employees">
            <tbody>
            <asp:DataList ID="dlEmployees" runat="server" OnItemDataBound="dtlEmployees_ItemDataBound" RepeatLayout="Flow">
                <HeaderTemplate>
                    <tr>
                        <td>Full Name</td>
                    </tr>
                </HeaderTemplate>
                <ItemTemplate>
                    <tr>
                        <td>
                            <asp:Label ID="lblFullName" runat="server"></asp:Label>
                        </td>
                    </tr>
                </ItemTemplate>
            </asp:DataList>
            </tbody>
        </table>
        </div>
    </form>
</asp:Content>
VB.NET PAGE:
Code:
Partial Class employees
    Inherits System.Web.UI.Page

    'Assign global variables
    Dim sqlConn As SqlConnection
    Dim sqlCmd As SqlCommand
    Dim strConnection As String
    Public strJobID As String = Nothing
    Private ds_details As New DataSet()
    Private cmd_details As SqlDataAdapter = New SqlDataAdapter

    Sub Page_Load(ByVal Sender As Object, ByVal E As EventArgs)
        'Assign connection string
        strConnection = System.Configuration.ConfigurationManager.AppSettings("strConn_Employees")
        sqlConn = New SqlConnection(strConnection)
        strJobID = Request.QueryString("JobID")

        'Bind data
        BindstrDbRecordID_employeedetails()
    End Sub

    'Bind Data to DataList Populating the Dataset 
    Sub BindstrDbRecordID_employeedetails()
        'SELECT applications from database
        cmd_details = New SqlDataAdapter("spEmployees @jobid = '" & strJobID & "'", sqlConn) 'LIVE

        'Bind data
        cmd_details.Fill(ds_details, "tblEmployees")
        dlEmployees.DataSource = ds_details
        dlEmployees.DataBind()

    End Sub

    'The ItemDataBound Event
    Public Sub dtlEmployees_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataListItemEventArgs)

        Dim drv As DataRowView = CType(e.Item.DataItem, DataRowView)

        If e.Item.ItemType = ListItemType.AlternatingItem Or e.Item.ItemType = ListItemType.Item Then
            'Assign database values
            Dim strDbFName As String = drv.Row("FName").ToString.Trim
            Dim strDbMName As String = drv.Row("MName").ToString.Trim
            Dim strDbLName As String = drv.Row("LName").ToString.Trim

            'Assign label value
            CType(e.Item.FindControl("lblFullName"), Label).Text = strDbLName & ", " & strDbMName & " " & strDbFName
        End If
        drv = Nothing 'Close DataRowView
    End Sub
End Class