hi,i have one doubt regarding page class methods.my doubt is when to use RegisterStartupScript() and RegisterClientScriptBlock() methods.what is the major difference between the two methods?.please give suggestions for where those best suited.
I Don't know much about this two except
The RegisterClientScriptBlock method adds a script block to the top of the rendered page.
The script block added by the RegisterStartupScript method executes when the page finishes loading but before the page's OnLoad event is raised.
Thanks and Regards Sandeep
If you want something you never had,
do something you have never done!
SqlConnection myConnection =
new SqlConnection(connstring );
SqlDataAdapter myAdapter =
"SELECT ProductID, ProductName, QuantityPerUnit, UnitPrice FROM Products",
//Fill the DataSet
DataSet ds = new DataSet();
//DataBind the Repeater
// MyRepeater.DataSource = ds.Tables["Products"].DefaultView;
// Populate the repeater control with the Items DataSet
PagedDataSource objPds = new PagedDataSource();
objPds.DataSource = ds.Tables.DefaultView;
objPds.AllowPaging = true;
objPds.CurrentPageIndex = CurrentPage;
I tmeans that the first table in the dataset is to be attached to the datasource of the control...DefaultView property returns a DataView you can use to sort, filter, and search a DataTable...
for eg... ds.Tables.DefaultView.RowFilter = "city='New York'"