Ask a Question related to ASP.NET General, Design and Development.
-
Arjen #1
Directory.Exists(Application["AppPath"])
Hello,
I want to check if an directory exist.
Directory.Exists(Application["AppPath"] + "/Uploads/")
I'm doing this inside a asp.net web project in a class file.
Here is the error message.
The name 'Application' does not exist in the class or namespace.
What kind of namespace do I have to include?
Or are there other options to get the application path?
Thanks!
Arjen Guest
-
#39593 [NEW]: XPath NodeList: "Couldn't fetch DOMElement: Node no longer exists"
From: dave dot lane at gmx dot net Operating system: Linux PHP version: 5.2.0 PHP Bug Type: DOM XML related Bug description:... -
"User cannot change pwd" and "Pwd never expire" by using Directory
I create a account by using the DirectorySerive and it is running: --------------------------------------------------------- Dim ContainerEntry As... -
Can't create PS file - "no desktop printer exists for this spool type"
I can create PDF files from Photoshop, Illustrator or from any eps file by dropping them on to Distiller, but I can't create a ps file. I don't have... -
Problem installing a perl module "File exists"
Hello, i'm trying to install the Date::Simple module, but i have an error: $ tar xvzf Date-Simple-3.01.tar.gz Date-Simple-3.01/... -
CLI Application: Still "The database directory cannot be found" - why?
Hello everybody I used SQLConnect() in my linux cli application to connect to a datasource. But I get this Error SQL1031N The database... -
Ron Vecchi #2
Re: Directory.Exists(Application["AppPath"])
if your accessing the Application object from a seperate class file not
inheriting from Page or UserControl
you need to reference it as System.Web.HttpAppliction["MyAppVar"]
"Arjen" <boah123@hotmail.com> wrote in message
news:bfu6j0$g3v$1@news2.tilbu1.nb.home.nl...> Hello,
>
> I want to check if an directory exist.
> Directory.Exists(Application["AppPath"] + "/Uploads/")
>
> I'm doing this inside a asp.net web project in a class file.
>
> Here is the error message.
> The name 'Application' does not exist in the class or namespace.
>
> What kind of namespace do I have to include?
> Or are there other options to get the application path?
>
> Thanks!
>
>
Ron Vecchi Guest
-
Arjen #3
Re: Directory.Exists(Application["AppPath"])
The message that I get now is:
'System.Web.HttpApplication' denotes a 'class' where a 'variable' was
expected
When using this code:
System.Web.HttpApplication["AppPath"]
Why?
"Ron Vecchi" <vencenzo@comcast.net> schreef in bericht
news:#vIbz34UDHA.2288@TK2MSFTNGP12.phx.gbl...> if your accessing the Application object from a seperate class file not
> inheriting from Page or UserControl
> you need to reference it as System.Web.HttpAppliction["MyAppVar"]
>
>
> "Arjen" <boah123@hotmail.com> wrote in message
> news:bfu6j0$g3v$1@news2.tilbu1.nb.home.nl...>> > Hello,
> >
> > I want to check if an directory exist.
> > Directory.Exists(Application["AppPath"] + "/Uploads/")
> >
> > I'm doing this inside a asp.net web project in a class file.
> >
> > Here is the error message.
> > The name 'Application' does not exist in the class or namespace.
> >
> > What kind of namespace do I have to include?
> > Or are there other options to get the application path?
> >
> > Thanks!
> >
> >
>
Arjen Guest



Reply With Quote

