First Error Message is like this
ObjectDataSource 'ObjectDataSource1' could not find a non-generic method
'Update' that has parameters: BoardManagerId, BoardName, Description,
IsForAdmin, CreatedDate.
i'm gonna bind BoardManager Data to GridView control ..but,.,error occur....
i really don't know why it is not working... if anyone know please tell
me....??
** this is DataSource ..
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
TypeName="BoardManagerDatabase"
SelectMethod="Gets" DeleteMethod="Delete" InsertMethod="Add"
UpdateMethod="Update">
<DeleteParameters>
<asp:Parameter Name="boardManagerId" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="boardManagerId" Type="Int32" />
<asp:Parameter Name="boardName" Type="String" />
<asp:Parameter Name="description" Type="String" />
<asp:Parameter Name="isForAdmin" Type="Boolean" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="boardName" Type="String" />
<asp:Parameter Name="description" Type="String" />
<asp:Parameter Name="isForAdmin" Type="Boolean" />
</InsertParameters>
</asp:ObjectDataSource>
** this is BoardManager.cs file...
public static void Update(int boardManagerId, string boardName, string
description, bool isForAdmin)
{
using (SqlConnection connection = new
SqlConnection(ConfigurationManager.ConnectionStrin gs["ConnectionString"].ConnectionString))
{
using (SqlCommand command = new
SqlCommand("BoardManager_Update", connection))
{
command.CommandType = CommandType.StoredProcedure;
command.Parameters.Add(new SqlParameter("@BoardManagerId",
boardManagerId));
command.Parameters.Add(new SqlParameter("@BoardName",
boardName));
command.Parameters.Add(new SqlParameter("@Description",
description));
command.Parameters.Add(new SqlParameter("@IsForAdmin",
isForAdmin));
connection.Open();
command.ExecuteNonQuery();
}
}
}