hi actually problem is with commented line.if i comment that line in that case no error.what i m missing?
// objPds.CurrentPageIndex = CurrentPage - 1;
Code:public partial class ConfigurationTool_EditPackage : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { //if (!string.IsNullOrEmpty(Request.Form["MemberID"])) //{ PackageList dd = PackageListBL.GetExtraInfo(121); if (dd != null) { PagedDataSource objPds = new PagedDataSource(); objPds.DataSource = dd; objPds.AllowPaging = true; objPds.PageSize = 5; // objPds.CurrentPageIndex = CurrentPage - 1; rptExtraInfo.DataSource = objPds; rptExtraInfo.DataBind(); } else { rptExtraInfo.DataBind(); } } //} public int CurrentPage { get { // look for current page in ViewState object o = this.ViewState["_CurrentPage"]; if (o == null) return 0; // default page index of 0 else return (int)o; } set { this.ViewState["_CurrentPage"] = value; } } }



LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks