I keep getting a db parser error. I took it from my text book assignment. Here is the error and code: I am confused with the problem
Server Error in '/' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Unknown server tag 'asp:ControlParameters'.
<%@ Page Language="C#" %>
<!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 id="Head1" runat="server">
<style type="text/css">
td, th
{
padding:10px;
}
</style>
<title>Show Filter Expression</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox
id="txtGrain"
Runat="server" />
<asp:Button
id="btnMatch"
Text="Match"
Runat="server" />
<hr />
<asp:Gridview
id="grdGrain"
DataSourceID="srdGrain"
Runat="server" />
<asp:SqlDataSource
id="srcGrain"
SelectCommand="SELECT Id, Name, Color, Gravity, Type FROM Grain"
FilterExpression="Name LIKE '{0}%'"
ConnectionString="<% ConnectionStrings:Grain %>"
Runat="server">
<FilterParameters>
<asp:ControlParameters Name="Name" ControlID="txtGrain" />
</FilterParamaters>
</asp:SqlDataSource>
</div>
</form>
</body>
</html>
Source Error:
Line 38: Runat="server"> Line 39: <FilterParameters> Line 40: <asp:ControlParameters Name="Name" ControlID="txtGrain" /> Line 41: </FilterParamaters> Line 42: </asp:SqlDataSource>
|
Source File: /Unit7.aspx Line: 40