Sorry i dint say clearly, this error is occur only when i write in ascx page:
<asp:LinqDataSource ID="LinqDataSource1" runat="server"
ContextTypeName="Testing2.Testing2DataContext" EnableDelete="True"
EnableInsert="True" EnableUpdate="True" TableName="TestingTable2s"
Where="ModuleId == @ModuleId" >
<WhereParameters>
<asp:Parameter Name="ModuleId" Type="Int32" />
</WhereParameters>
</asp:LinqDataSource>
Another question, can enyone help me convert it into VB code ?
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if ((e.Row.RowType == DataControlRowType.DataRow))
{
ThingsForSale ThingsForSale = ((ThingsForSale)(e.Row.DataItem));
if ((PortalSecurity.IsInRole("Administrators"))
|| (Entities.Users.UserController.GetCurrentUserInfo().UserID == (int)ThingsForSale.UserID))
{
e.Row.Cells[0].Enabled = true;
}
else
{
e.Row.Cells[0].Text = " ";
}
}
}