473,326 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

binding GridView


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();
}
}
}
Nov 19 '05 #1
0 894

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: sck10 | last post by:
Hello, I have a GridView that is using the following to connect to a SQL Server 2000 stored procedure: <asp:SqlDataSource ID="dsWebDocList" SelectCommand="sp_web_WebDocument"...
3
by: Hans Merkl | last post by:
Hi, I was wondering if it's possible to bind the header text of a GridView column to a method of an object I have. At the moment I am setting the header texts in Page_Load but I was wondering if...
1
by: Smash | last post by:
I have problem binding gridview.... At first i didn't want to bind gridview at first page load...so in my objectdatasource_selecting event i wrote this: If Not Page.IsPostBack Then e.Cancel =...
3
by: mateo | last post by:
Hello, I have a GridView inside which i want to show 3 dropdownList (one for each Column). So i've created 3 TemplateField Continent Country City
5
by: Amit | last post by:
Hello, I have a simple search screen, with two drop-downs and a text box. There's also a GridView control that is using a SqlDataSource control to show the matching results. The SqlDataSource uses...
8
by: AG | last post by:
ASP.NET 2.0, VS 2005 I have a gridview with paging enabled, bound to an objectdatasource. Both were dropped on to the page and configured via the wizards. Basically working as expected. The...
4
by: Mike | last post by:
I'm having trouble getting a gridview to bind. I probably missing something completely obvious and would appreciate any help on offer. I'm passing parameters via querystring, and have created a...
3
by: RobertTheProgrammer | last post by:
Hi folks, I've got another problem. Basically, I'm trying to use a nested GridView, however the nexted GridView displays no values (even though in debug I'm getting valid values into my DataSet. ...
0
by: Sobin Thomas | last post by:
Hi All, How can I bind the Gridview control to Sql Datasource control on a button click(I see majority of the articles binding datasource at page load) I need to enable the paging and sorting of...
1
by: Sobin Thomas | last post by:
Hi All, How can I bind the Gridview control to Sql Datasource control on a button click(I see majority of the articles binding datasource at page load) I need to enable the paging and sorting of...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.