Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
|
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 14th, 2006, 11:52 AM
Authorized User
 
Join Date: Oct 2003
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default unable to display my datalist

I am attempting to display a datalist on my web page,however, my screen displays only the header and a temporary 'List Of Categories' statement I created.The department list is supposed to show a list of departments.It's connected to SQL 2005 Express database.The only errors I get are from the following file:
<asp:DataList ID="list" runat="server" Width="200px" >
    <ItemTemplate>
    &nbsp;&raquo;
        <asp:HyperLink
         ID="HyperLink1"
          Runat="server"
          NavigateUrl ='<%# "../Catalog.aspx?DepartmentID=" +
           Eval("DepartmentID")%>'
           Text='<%# Eval("Name") %>'
           ToolTip='<%# Eval("Description")%>'
           CssClass='<%# Eval("DepartmentID").ToString()==
           Request.QueryString["DepartmentID"] ? "DepartmentSelected" :"DepartmentUnselected"
           %>'>
         </asp:HyperLink>
&nbsp;&laquo;
    </ItemTemplate>
    <HeaderTemplate>
        Choose a Department
    </HeaderTemplate>
    <ItemStyle CssClass ="DepartmentListContent" />
    <HeaderStyle CssClass="DepartmentListHead" />
</asp:DataList>
----------------------------------------------------------------
The error list states there are 62 errors in this file.
The trouble is the dubugger displays no line numbers to correlate to the error messages. The code does compile since I am able to view the page. It simply does not display the department list.
When I checked the server explorer, my connection test OK. And YES, there is data in the table to populate the datalist. I have to wonder whether the problem is with this file at all or something else.
There are no other error messages I am aware of.
I'm very baffled at this problem and i'm blaming it on my inexperience with ASP.Net.

Anyone who can identify my problems PLEASE educate me on this one.
I'm using C# as my development language.






Similar Threads
Thread Thread Starter Forum Replies Last Post
datalist display almotions ASP.NET 2.0 Basics 1 February 18th, 2008 03:19 AM
How To Display Images in DataList abdul_owiusa General .NET 4 June 3rd, 2005 11:49 AM
How To Display Images in DataList abdul_owiusa General .NET 1 May 20th, 2005 09:01 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.