blogspot visit counter

Thursday, 2 May 2013

gridview rowcommand object reference not set to an instance of an object

Basic Step by Step WCF WebService[-2]
Introduction : -

I am using a gridview with objectdatasource .I have select the data from object datasource but when i insert form gridview i got the error gridview rowcommand object reference not set to an instance of an object.

 Error Page is Here


My gridvew show the all the record from the database as shown in below figure.


Insert the values in textbox


When I insert data in textbox of gridview end click on Insert link then i got the error

Solution :-I am not bind the insert command through the ObjectDataSource like this as shown in figure 

Bind the onbect Data Source Like This Figure
 


Click Next



Click On Fnish Button and Run the Project and you are not getting any error .Data is inserting using gridview successfully as shown  below   figure.



No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...