Hi Spacy, now I use ur 2nd suggestion. i.e when i select
Books, the data is displayed, then I navigate through the records.
But when I select Journals, the following error is displayed.
Server Error in '/e-library' Application.
--------------------------------------------------------------------------------
Invalid CurrentPageIndex value. It must be >= 0 and < the PageCount.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: Invalid CurrentPageIndex value. It must be >= 0 and < the PageCount.
Source Error:
Line 219: DataGrid1.DataSource = DsLibrary1
Line 220: DataGrid1.DataMember = "Library"
Line 221: DataGrid1.DataBind()
Line 222: End Sub
Line 223:
Source File: c:\inetpub\wwwroot\e-library\Borrow.aspx.
vb Line: 221
Stack Trace:
[HttpException (0x80004005): Invalid CurrentPageIndex value. It must be >= 0 and < the PageCount.]
System.Web.UI.WebControls.DataGrid.CreateControlHi erarchy(Boolean useDataSource)
System.Web.UI.WebControls.BaseDataList.OnDataBindi ng(EventArgs e)
System.Web.UI.WebControls.BaseDataList.DataBind()
e_library.Borrow.BindGrid() in c:\inetpub\wwwroot\e-library\Borrow.aspx.
vb:221
e_library.Borrow.ddlView1_SelectedIndexChanged(Obj ect sender, EventArgs e) in c:\inetpub\wwwroot\e-library\Borrow.aspx.
vb:135
System.Web.UI.WebControls.ListControl.OnSelectedIn dexChanged(EventArgs e)
System.Web.UI.WebControls.DropDownList.System.Web. UI.IPostBackDataHandler.RaisePostDataChangedEvent( )
System.Web.UI.Page.RaiseChangedEvents()
System.Web.UI.Page.ProcessRequestMain()
I don't understand why it happens.
Thanks!