<asp:GridView ID="GridView5" runat="server" AutoGenerateColumns="False"
DataKeyNames="CategoryId" DataSourceID="LinqDataSource1" >
<Columns>
<asp:CommandField ShowSelectButton="True" />
<asp:BoundField DataField="CategoryId" HeaderText="CategoryId"
InsertVisible="False" ReadOnly="True" SortExpression="CategoryId" />
<asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
<asp:BoundField DataField="Descn" HeaderText="Descn" SortExpression="Descn" />
</Columns>
</asp:GridView>
<asp:LinqDataSource ID="LinqDataSource1" runat="server"
ContextTypeName="DatabaeseDataContext" EntityTypeName="" TableName="Categories">
</asp:LinqDataSource>
<asp:DetailsView ID="DetailsView2" runat="server" AutoGenerateRows="False"
DataKeyNames="CategoryId" DataSourceID="LinqDataSource8" Height="50px"
Width="202px">
<Fields>
<asp:BoundField DataField="CategoryId" HeaderText="CategoryId"
InsertVisible="False" ReadOnly="True" SortExpression="CategoryId" />
<asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
<asp:BoundField DataField="Descn" HeaderText="Descn" SortExpression="Descn" />
<asp:CommandField ShowDeleteButton="True" ShowEditButton="True"
ShowInsertButton="True" />
</Fields>
</asp:DetailsView>
<asp:LinqDataSource ID="LinqDataSource8" runat="server"
ContextTypeName="DatabaeseDataContext" EnableDelete="True" EnableInsert="True"
EnableUpdate="True" EntityTypeName="" TableName="Categories"
Where="CategoryId ==@CategoryId" > -------就是这里出现错误
<WhereParameters>
<asp:ControlParameter ControlID="GridView5" Name="CategoryId"
PropertyName="SelectedValue" Type="Int32" />
</WhereParameters>
</asp:LinqDataSource>
求解答。。谢谢
DataKeyNames="CategoryId" DataSourceID="LinqDataSource1" >
<Columns>
<asp:CommandField ShowSelectButton="True" />
<asp:BoundField DataField="CategoryId" HeaderText="CategoryId"
InsertVisible="False" ReadOnly="True" SortExpression="CategoryId" />
<asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
<asp:BoundField DataField="Descn" HeaderText="Descn" SortExpression="Descn" />
</Columns>
</asp:GridView>
<asp:LinqDataSource ID="LinqDataSource1" runat="server"
ContextTypeName="DatabaeseDataContext" EntityTypeName="" TableName="Categories">
</asp:LinqDataSource>
<asp:DetailsView ID="DetailsView2" runat="server" AutoGenerateRows="False"
DataKeyNames="CategoryId" DataSourceID="LinqDataSource8" Height="50px"
Width="202px">
<Fields>
<asp:BoundField DataField="CategoryId" HeaderText="CategoryId"
InsertVisible="False" ReadOnly="True" SortExpression="CategoryId" />
<asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
<asp:BoundField DataField="Descn" HeaderText="Descn" SortExpression="Descn" />
<asp:CommandField ShowDeleteButton="True" ShowEditButton="True"
ShowInsertButton="True" />
</Fields>
</asp:DetailsView>
<asp:LinqDataSource ID="LinqDataSource8" runat="server"
ContextTypeName="DatabaeseDataContext" EnableDelete="True" EnableInsert="True"
EnableUpdate="True" EntityTypeName="" TableName="Categories"
Where="CategoryId ==@CategoryId" > -------就是这里出现错误
<WhereParameters>
<asp:ControlParameter ControlID="GridView5" Name="CategoryId"
PropertyName="SelectedValue" Type="Int32" />
</WhereParameters>
</asp:LinqDataSource>
求解答。。谢谢
怎么还会报错啊?