Object reference not set to an instance of an object.....?
Posted
by jamal
on Stack Overflow
See other posts from Stack Overflow
or by jamal
Published on 2010-03-13T10:31:19Z
Indexed on
2010/03/13
10:35 UTC
Read the original article
Hit count: 225
Hi guys I always got this error from my site and it keeps bugging me.I've been trying to figure out the cause of this error but I can't really figure it out.
Here's the stacktrace:
at BasePage.Page_PreInit(Object sender, EventArgs e) at System.EventHandler.Invoke(Object sender, EventArgs e) at System.Web.UI.Page.OnPreInit(EventArgs e) at System.Web.UI.Page.PerformPreInit() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
And on my basepage I only got this code:
Imports Microsoft.VisualBasic
Public Class BasePage
Inherits System.Web.UI.Page
Private Sub Page_PreInit(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreInit
Page.Theme = "Something"
If (Request.UserAgent.IndexOf("AppleWebKit") > 0) Then
Request.Browser.Adapters.Clear()
End If
End Sub
Private Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender
If Me.Title = "Untitled Page" Then
Throw New Exception("Page title cannot be ""Untitled Page"".")
End If
End Sub
End Class
According to the stacktrace this always happens on my basepage preinit event.What do you think is the problem here guys?
© Stack Overflow or respective owner