err msg: and yes i did read the sticky
error line in red:Code:Object reference not set to an instance of an object. 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.NullReferenceException: Object reference not set to an instance of an object. Source Error: Line 329: Line 330: Dim lbPageNumber As LinkButton Line 331: lbPageNumber.Text = x.ToString() Line 332: lbPageNumber.CommandName = "PageNumber" Line 333: lbPageNumber.CommandArgument = x Source File: C:\Inetpub\wwwroot\keithdesign\views\projects.aspx.vb Line: 331 Stack Trace: [NullReferenceException: Object reference not set to an instance of an object.] view_projects.DrawPaging(Int32 pageNumber, Int32 pageCount) in C:\Inetpub\wwwroot\keithdesign\views\projects.aspx.vb:331 view_projects.Populate_rpProjectList(Params myParams) in C:\Inetpub\wwwroot\keithdesign\views\projects.aspx.vb:83 view_projects.Page_Load() in C:\Inetpub\wwwroot\keithdesign\views\projects.aspx.vb:26 System.Web.Util.CalliHelper.ArglessFunctionCaller(IntPtr fp, Object o) +5 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +858603 System.Web.UI.Control.OnLoad(EventArgs e) +99 System.Web.UI.Control.LoadRecursive() +47 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436
dunno why it's throwing that error? any ideasCode:Dim x, y, z, pageEnd, pageStart As Integer For x = pageStart To pageEnd If x = pageNumber Then 'sb.Append("<strong>[") 'sb.Append(x) 'sb.Append("]</strong> ") Dim lbPageNumber As LinkButton lbPageNumber.Text = x lbPageNumber.CommandName = "PageNumber" lbPageNumber.CommandArgument = x lbPageNumber.Visible = True lbPageNumber.Enabled = False lbPageNumber.Font.Bold = True AddHandler lbPageNumber.Command, AddressOf lblPageLinks_OnClick pnlPagelinks.Controls.Add(lbPageNumber) Else 'sb.Append("<a href=") 'sb.Append(DrawLink(x)) 'sb.Append(">") 'sb.Append(x) 'sb.Append("</a> ") Dim lbPageNumber As LinkButton lbPageNumber.Text = x lbPageNumber.CommandName = "PageNumber" lbPageNumber.CommandArgument = x lbPageNumber.Visible = True AddHandler lbPageNumber.Command, AddressOf lblPageLinks_OnClick pnlPagelinks.Controls.Add(lbPageNumber) End If Next![]()
Shem



LinkBack URL
About LinkBacks

Reply With Quote



Bookmarks