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>
»
<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>
«
</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.
|