Hi,
You can perform the search action in the same page, by passing the related parameters while binding time.
You can handle this in while preparing stored procedure itself.
create procedure procname
(
@Type varchar(100),
@inputparameter varchar(max)
)
as
begin
if @Type ='All'
begin
select * from tablename
end
else
begin
select * from tablename where col=@inputparameter
end
end
call that procedure in your application and based on passed parameter it will search and give you the result.