Click here to Skip to main content
15,910,981 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:

how to write stored procedure for grid view control in asp dot net
Posted

This is a sequence of words which makes no sense at all. "Stored procedure" is something in you database, and "grid view" is on some Web page, in your case. Stored procedures and the database itself are totally agnostic to controls, ASP.NET, UI and the like.

—SA
 
Share this answer
 
Comments
__TR__ 5-Jan-13 12:28pm    
My 5!
Sergey Alexandrovich Kryukov 5-Jan-13 19:39pm    
Thank you,
—SA
how to write stored procedure for grid view
Invalid question I would say.

Stored Procedures and grid are not directly related. Stored Procedure are set of pre-compiled queries that are used to retrieve data from database. Grid is a server control to show data.

Now, there is no difference in writing a SP for a grid or any other control or reason. SP is to retrieve data, just write an SP and get the data. Use the data retrieved as a source for grid.

Following will help you:
MSDN: HOW TO: Call SQL Server Stored Procedures in ASP.NET by Using Visual C# .NET[^]
MSDN: HOW TO: Call a Parameterized Stored Procedure by Using ADO.NET and Visual C# .NET[^]
ADO.NET : Using Stored Procedures[^]
MSDN: CREATE PROCEDURE (Transact-SQL)[^]
 
Share this answer
 
Comments
__TR__ 5-Jan-13 12:28pm    
My 5!
Sandeep Mewara 5-Jan-13 12:30pm    
Thanks.
Sergey Alexandrovich Kryukov 5-Jan-13 19:40pm    
Useful information, a 5.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900