Skip to content

Tag Archives: Databinding

Implementing Custom Paging in DataRepeater using C# and SQL Server

22-Oct-09

Normally DataRepeater doesn’t have a paging feature; and you can implement it using LINQ, if you are using .Net 3.5. Here is an implementation which is using SQL Server 2005 feature ROW_NUMBER(). You can get more information about ROW_NUMBER() from MSDN.
Stored Procedure – xsp_GetPersons

CREATE PROCEDURE xsp_GetPersons
@StartIndex INT, @Count INT
AS
BEGIN
DECLARE @EndIndex INT
SET @StartIndex = @StartIndex * [...]

Databinding in ASP.Net dropdownlist

14-May-07

In many forums, I used to see people asking for code to bind the dropdown list from basic collections. Here is the code to bind a Hash Table to ASP:Dropdown list, and setting the value of the selected item to the Text box. This is in ASP.Net 1.1.

Protected Sub Page_Load(ByVal sender As Object, ByVal [...]