Errors on ..ServerVariables

T

tshad

Why is
System.Web.HttpContext.Current.Request.ServerVariables["APPL_PHYSICAL_PATH"]
giving me the following message:

C:\VSProjects\NewHires\NewHire.cs(227):
'System.Web.HttpRequest.ServerVariables' denotes a 'property' where a
'method' was expected

I have used this is in other projects without any problems.

Here is my using section - am I missing anything there?

using System;
using System.Data;
using System.IO;
using ICSharpCode.SharpZipLib.Zip;
using ICSharpCode.SharpZipLib.Checksums;
using System.Text.RegularExpressions;
using System.Data.SqlClient;
using System.Web.Services;
using MyFunctions;
using System.Collections;
using System.ComponentModel;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

Thanks,

Tom
 
G

Guest

Why is
System.Web.HttpContext.Current.Request.ServerVariables["APPL_PHYSICAL_PATH"­]
giving me the following message:

C:\VSProjects\NewHires\NewHire.cs(227):
'System.Web.HttpRequest.ServerVariables' denotes a 'property' where a
'method' was expected

Maybe you forgot a parentheses after .ToString()? Usually this error
is about ( ) [ ]

System.Web.HttpContext.Current.Request.ServerVariables["APPL_PHYSICAL_PATH"­].ToString()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top