Hi all
I would like to reference a file in a class in the 'App_Code' folder and I
wanted to use the server.MapPath property
How can I do that?
Samuel 8 1667
How can you have a "file in a class"? confused.
Peter
--
Co-founder, Eggheadcafe.com developer portal: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
"Samuel Shulman" wrote:
Hi all
I would like to reference a file in a class in the 'App_Code' folder and I
wanted to use the server.MapPath property
How can I do that?
Samuel
A File Path
I want to stae the path of a datbase (.mdb) file but instead of stating the
absolute path I want to state the relative path so I wanted to use the
server.Mappath property
Thank you,
Samuel
"Peter Bromberg [C# MVP]" <pb*******@yahoo.nospammin.comwrote in message
news:8F**********************************@microsof t.com...
How can you have a "file in a class"? confused.
Peter
--
Co-founder, Eggheadcafe.com developer portal: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
"Samuel Shulman" wrote:
>Hi all
I would like to reference a file in a class in the 'App_Code' folder and I wanted to use the server.MapPath property
How can I do that?
Samuel
Samuel,
It is not clear at all what you are asking for. Can you give an example in
pseudo code?
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
"Samuel Shulman" <sa************@ntlworld.comwrote in message
news:%2******************@TK2MSFTNGP04.phx.gbl...
>A File Path
I want to stae the path of a datbase (.mdb) file but instead of stating
the absolute path I want to state the relative path so I wanted to use the
server.Mappath property
Thank you,
Samuel
"Peter Bromberg [C# MVP]" <pb*******@yahoo.nospammin.comwrote in message
news:8F**********************************@microsof t.com...
>How can you have a "file in a class"? confused. Peter
-- Co-founder, Eggheadcafe.com developer portal: http://www.eggheadcafe.com UnBlog: http://petesbloggerama.blogspot.com
"Samuel Shulman" wrote:
>>Hi all
I would like to reference a file in a class in the 'App_Code' folder and I wanted to use the server.MapPath property
How can I do that?
Samuel
I simply want to create a connection string using the server.mappath to a
database file that resides in a sub folder in the website
"Eliyahu Goldin" <RE**************************@mMvVpPsS.orgwrote in
message news:OD****************@TK2MSFTNGP02.phx.gbl...
Samuel,
It is not clear at all what you are asking for. Can you give an example in
pseudo code?
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
"Samuel Shulman" <sa************@ntlworld.comwrote in message
news:%2******************@TK2MSFTNGP04.phx.gbl...
>>A File Path
I want to stae the path of a datbase (.mdb) file but instead of stating the absolute path I want to state the relative path so I wanted to use the server.Mappath property
Thank you, Samuel
"Peter Bromberg [C# MVP]" <pb*******@yahoo.nospammin.comwrote in message news:8F**********************************@microsof t.com...
>>How can you have a "file in a class"? confused. Peter
-- Co-founder, Eggheadcafe.com developer portal: http://www.eggheadcafe.com UnBlog: http://petesbloggerama.blogspot.com
"Samuel Shulman" wrote:
Hi all
I would like to reference a file in a class in the 'App_Code' folder and I wanted to use the server.MapPath property
How can I do that?
Samuel
So what is your problem with MapPath method?
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
"Samuel Shulman" <sa************@ntlworld.comwrote in message
news:uq****************@TK2MSFTNGP03.phx.gbl...
>I simply want to create a connection string using the server.mappath to a database file that resides in a sub folder in the website
"Eliyahu Goldin" <RE**************************@mMvVpPsS.orgwrote in
message news:OD****************@TK2MSFTNGP02.phx.gbl...
>Samuel,
It is not clear at all what you are asking for. Can you give an example in pseudo code?
-- Eliyahu Goldin, Software Developer & Consultant Microsoft MVP [ASP.NET]
"Samuel Shulman" <sa************@ntlworld.comwrote in message news:%2******************@TK2MSFTNGP04.phx.gbl. ..
>>>A File Path
I want to stae the path of a datbase (.mdb) file but instead of stating the absolute path I want to state the relative path so I wanted to use the server.Mappath property
Thank you, Samuel
"Peter Bromberg [C# MVP]" <pb*******@yahoo.nospammin.comwrote in message news:8F**********************************@microsof t.com... How can you have a "file in a class"? confused. Peter
-- Co-founder, Eggheadcafe.com developer portal: http://www.eggheadcafe.com UnBlog: http://petesbloggerama.blogspot.com
"Samuel Shulman" wrote:
Hi all > I would like to reference a file in a class in the 'App_Code' folder and I wanted to use the server.MapPath property > How can I do that? > Samuel > > >
It simply doesn't work (the class is under the 'App_Code' folder)
"Eliyahu Goldin" <RE**************************@mMvVpPsS.orgwrote in
message news:%2******************@TK2MSFTNGP02.phx.gbl...
So what is your problem with MapPath method?
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
"Samuel Shulman" <sa************@ntlworld.comwrote in message
news:uq****************@TK2MSFTNGP03.phx.gbl...
>>I simply want to create a connection string using the server.mappath to a database file that resides in a sub folder in the website "Eliyahu Goldin" <RE**************************@mMvVpPsS.orgwrote in message news:OD****************@TK2MSFTNGP02.phx.gbl...
>>Samuel,
It is not clear at all what you are asking for. Can you give an example in pseudo code?
-- Eliyahu Goldin, Software Developer & Consultant Microsoft MVP [ASP.NET]
"Samuel Shulman" <sa************@ntlworld.comwrote in message news:%2******************@TK2MSFTNGP04.phx.gbl.. . A File Path
I want to stae the path of a datbase (.mdb) file but instead of stating the absolute path I want to state the relative path so I wanted to use the server.Mappath property
Thank you, Samuel
"Peter Bromberg [C# MVP]" <pb*******@yahoo.nospammin.comwrote in message news:8F**********************************@microsof t.com... How can you have a "file in a class"? confused. Peter > -- Co-founder, Eggheadcafe.com developer portal: http://www.eggheadcafe.com UnBlog: http://petesbloggerama.blogspot.com > > > > "Samuel Shulman" wrote: > >Hi all >> >I would like to reference a file in a class in the 'App_Code' folder >and I >wanted to use the server.MapPath property >> >How can I do that? >> >Samuel >> >> >>
It does. Likely something is not 100% right on your side. You can make this
thread more productive if you tell what you pass to the method, what you
expect and what you get.
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
"Samuel Shulman" <sa************@ntlworld.comwrote in message
news:uM****************@TK2MSFTNGP04.phx.gbl...
It simply doesn't work (the class is under the 'App_Code' folder)
"Eliyahu Goldin" <RE**************************@mMvVpPsS.orgwrote in
message news:%2******************@TK2MSFTNGP02.phx.gbl...
>So what is your problem with MapPath method?
-- Eliyahu Goldin, Software Developer & Consultant Microsoft MVP [ASP.NET]
"Samuel Shulman" <sa************@ntlworld.comwrote in message news:uq****************@TK2MSFTNGP03.phx.gbl...
>>>I simply want to create a connection string using the server.mappath to a database file that resides in a sub folder in the website "Eliyahu Goldin" <RE**************************@mMvVpPsS.orgwrote in message news:OD****************@TK2MSFTNGP02.phx.gbl... Samuel,
It is not clear at all what you are asking for. Can you give an example in pseudo code?
-- Eliyahu Goldin, Software Developer & Consultant Microsoft MVP [ASP.NET]
"Samuel Shulman" <sa************@ntlworld.comwrote in message news:%2******************@TK2MSFTNGP04.phx.gbl. .. >A File Path > I want to stae the path of a datbase (.mdb) file but instead of stating the absolute path I want to state the relative path so I wanted to use the server.Mappath property > Thank you, Samuel > "Peter Bromberg [C# MVP]" <pb*******@yahoo.nospammin.comwrote in message news:8F**********************************@microsof t.com... >How can you have a "file in a class"? confused. >Peter >> >-- >Co-founder, Eggheadcafe.com developer portal: >http://www.eggheadcafe.com >UnBlog: >http://petesbloggerama.blogspot.com >> >> >> >> >"Samuel Shulman" wrote: >> >>Hi all >>> >>I would like to reference a file in a class in the 'App_Code' folder >>and I >>wanted to use the server.MapPath property >>> >>How can I do that? >>> >>Samuel >>> >>> >>> > > This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Bill Burwell |
last post by:
I am converting a VB6 WebClass application to VB.Net. Used the VB upgrade
tool to do the conversion - and it left me a lot of little code things to
do. Did those code things and got my app to...
|
by: brian.fairchild |
last post by:
I have a downloader page in my asp.net application that looks at a
session variable to get the path to the file, checks it then downloads
it using the Response object. When the "File Download"...
|
by: Bill Burwell |
last post by:
I am converting a VB6 WebClass application to VB.Net. Used the VB upgrade
tool to do the conversion - and it left me a lot of little code things to
do. Did those code things and got my app to...
|
by: Eugene Anthony |
last post by:
ds1.Tables.Rows.ItemArray.GetValue(0).ToString() contains the
string path: images/5/Video1/qbert.flv
if (File.Exists(ds1.Tables.Rows.ItemArray.GetValue(0).ToString()))
{
//code to execute
}
...
|
by: =?Utf-8?B?QU9UWCBTYW4gQW50b25pbw==?= |
last post by:
Hi,
I have been using the code (some of it has been removed for simplicity)
below to allow authenticated (using ASP.NET membership database) users to get
a file from their archive area. It...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |