You need to pass the current page number and the page size of the GridView to the stored procedure and should make use of that in the SELECT statement's WHERE clause.
CREATE PROCEDURE get_data(@pageIndex int,
@PageSize int,
@OutParameter int out
)
AS
Select * from
(
select *,ROW_NUMBER() over(Order By Name) as PageNum
from yourtable
)
as yourtable
where PageNum Between (@PageIndex - 1) * @PageSize + 1 and @PageIndex * @PageSize
select @outParameter=count(*) from yourtable
This stored procedure should be called and the data should be binded in the GridView1_PageIndexChanged event.
//gets the page index
int pageIndex = GridView1.CurrentPageIndex;
//gets the page size
int pageSize = GridView1.PageSize;