未将对象引用设置到对象的实例,求解
这是一个列表页面的分页?page=xx, 第一页全部正常,但有的分页打不开,报这个错,求大神指点
[NullReferenceException: 未将对象引用设置到对象的实例。]
OblogNT.Web.message.Page_Load(Object sender, EventArgs e) +185
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +33
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436
以下是相关.cs
namespace OblogNT.Web
{
using OblogNT.Common;
using OblogNT.Core;
using System;
using System.Web.UI;
using System.Web.UI.WebControls;
public class message : Page
{
private string _url = string.Empty;
protected Literal msg;
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
}
protected void Page_Load(object sender, EventArgs e)
{
if (RequestUtils.Get("url").Length == 0)
{
this._url = (base.Request.UrlReferrer == null) ? null : base.Request.UrlReferrer.ToString();
}
else
{
this._url = RequestUtils.Get("url");
}
if (this._url == null)
{
this._url = BlogInfo.BlogUrl + "default.aspx";
}
string str = RequestUtils.Get("msg");
this.msg.Text = str;
}
protected string url
{