Data in Gridview ASP .Net on button click event
-
Hello All, I am beginner in ASP .NET I had used SQL2000, GridView and SQLDataSource. While creating SQDataSource1 query was mentioned "Select top 5 EmployeeId, FirstName from Employee". As page is loaded it show data without error. Now I had added button on its click event I had used mentioned query "Select top 5 ProductId, ProductName from Product". My question is can again GridView can be bind with DataKeyNames. If yes how can i do it. I had try code in vb & c#. Please help. Thanks in advance
Shazz here to help you...
-
Hello All, I am beginner in ASP .NET I had used SQL2000, GridView and SQLDataSource. While creating SQDataSource1 query was mentioned "Select top 5 EmployeeId, FirstName from Employee". As page is loaded it show data without error. Now I had added button on its click event I had used mentioned query "Select top 5 ProductId, ProductName from Product". My question is can again GridView can be bind with DataKeyNames. If yes how can i do it. I had try code in vb & c#. Please help. Thanks in advance
Shazz here to help you...
hi, do you want to bind the grid with product columns now? I think not possible, I think you should call a user control on click event, use grid view on that control and bind your product columns on that.