public static void Alert(Page page, string Message)
2. -----------------------------------------------------------
{
ScriptManager.RegisterStartupScript(page, typeof(Page), "alert", "alert('" + Message + "');", true);
}
protected void Button3_Click(object sender, EventArgs e)
{
Hashtable myht = Createhashtable();
IDictionaryEnumerator _myEnum = myht.GetEnumerator();
StringBuilder sb = new StringBuilder();
while (_myEnum.MoveNext())
{
sb.Append(_myEnum.Key);
sb.Append(" ");
sb.Append(_myEnum.Value);
sb.Append("</br>");
}
Response.Write(sb.ToString());
}
--------------------------------------------------------------------------------------
ALTER PROCEDURE [dbo].[GetCustomersPageWise]
@PageIndex INT = 1
,@PageSize INT = 10
,@RecordCount INT OUTPUT
AS -- GetCustomersPageWise '2','15','' ,'desc'
BEGIN
SET NOCOUNT ON;
SELECT ROW_NUMBER() OVER
(
ORDER BY [CustomerID] ASC
)AS RowNumber
,[CustomerID]
,[CompanyName]
,[ContactName]
INTO #Results
FROM [Customers]
SELECT @RecordCount = COUNT(*) FROM #Results
SELECT * FROM #Results
WHERE RowNumber BETWEEN(@PageIndex -1) * @PageSize + 1 AND(((@PageIndex -1) * @PageSize + 1) + @PageSize) - 1
DROP TABLE #Results
END
---------------------------------------------------------------------------------------------
0 comments:
Post a Comment