Aktifhosting adlı üyeden alıntı: mesajı görüntüle
Querystring ya da her hangi bir kontrol aracılığı ile sorgunuza where koşulu ekleyerek dilediğiniz kriterdeki veriyi gösterebilirsiniz.

Sayfa.aspx.cs



using (SqlCommand cmd = new SqlCommand("GetCustomersPageWise", con))



Aşağıda slq içerisinde GetCustomersPageWise adında prosedür oluşturuldu yukarıdaki kod satırında Sqlcommand ile direk GetCustomersPageWise adlı procedure bağlanıp prodedür sonucunu çekiyor. Yukarıdaki sqlcommad sorgu yerine SektorId=1 şeklinde bir satırı eklenebilir mi?


Sql Procedure




CREATE PROCEDURE GetCustomersPageWise
@PageIndex INT = 1
,@PageSize INT = 10
,@RecordCount INT OUTPUT