开发者

can't get GET variables

开发者 https://www.devze.com 2023-01-10 01:39 出处:网络
I am trying to get the values from GET.I\'ve been using: Request.QueryString[\"$random_var\"] with success for a little while now.Suddenly, this code:

I am trying to get the values from GET. I've been using:

Request.QueryString["$random_var"]

with success for a little while now. Suddenly, this code:

bool preview = (!string.IsNullOrEmpty(Request.QueryString["previewtheme"]));

Produces this error:

An object reference is required for the non-static field, method, or property 开发者_C百科'System.Web.UI.UserControl.Request.get'

I am using the following:

using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

Any ideas of what is keeping asp.net from doing this simple task?

0

精彩评论

暂无评论...
验证码 换一张
取 消