There is a web application, the page contains a GridView with a connected database via the SqlDataSource. How can I call a stored procedure ( StoredProcedure2 ) and pass a parameter to this procedure when I call it? I called the stored procedure (another stored procedure called StoredProcedure1 , which did not require passing parameters to it by:
SqlDataSource1.SelectCommand = "StoredProcedure1"; ALTER PROCEDURE dbo.StoredProcedure1 AS SELECT ID, Name, Surname FROM Table1 WHERE Name='Sania' ALTER PROCEDURE dbo.StoredProcedure2 @Name VARCHAR(15) AS SELECT ID, Name, Surname FROM Table1 WHERE Name= @Name