I am trying to make some program with XML in class library by C#.
I read XML file in my program by using oXmlDoc.Load(xmlfilename);
But, It occured error... It read from C:\windows\system32,,, But my
XML file is in same directory with my program.
So, I know I have to use relative path....
Who knows how to get relative path in class library?
Is there anyone who know this solution...
Please,,,Help me,,,,
I will appreciate.... 3 9003
Pass the Server object to the function or constructor.
Then u can access the function mappath.
"handlim" <ha*****@hotmail.com> wrote in message
news:6c**************************@posting.google.c om... I am trying to make some program with XML in class library by C#. I read XML file in my program by using oXmlDoc.Load(xmlfilename); But, It occured error... It read from C:\windows\system32,,, But my XML file is in same directory with my program. So, I know I have to use relative path.... Who knows how to get relative path in class library?
Is there anyone who know this solution...
Please,,,Help me,,,,
I will appreciate....
Thank you for your answer,,,
But, Can I use the server object in class library,,,
If yes,,, How can I use it?
I tried several times to use the server object in class library,,, But I can't.
Please, Give me any solution,,,,
anyway, Thank for your answer,,,
Have good days,,,
Say your function is
private void MyFunction(string str1)
{
}
Convert it to
using System.Web.UI;
MyFunction(string str1, Page.Server srvr)
{
--- no u can use the srvr.MapPath() function here
}
"handlim" <ha*****@hotmail.com> wrote in message
news:6c*************************@posting.google.co m... Thank you for your answer,,,
But, Can I use the server object in class library,,,
If yes,,, How can I use it?
I tried several times to use the server object in class library,,, But I
can't. Please, Give me any solution,,,,
anyway, Thank for your answer,,,
Have good days,,, This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: peter |
last post by:
Hello all,
I've read all the posts concerning relative imports of modules and I am
glad I saw some consensus on a syntax.
At this moment I am however bound to python 2.3.
Does anyone know a...
|
by: draco |
last post by:
Hi,
Let's say I have a dynamic library libapple.so with a method
applemethod() which expects a filename string. I call this method from
main() which is in the file foo.c. Now foo.c and apple.so...
|
by: Julia |
last post by:
Hi,
I have two application which 'evaluate'( New FileStream(path....) relative
path,
when evaluating the path inside a window service it always return something
like
...
|
by: Ben Fidge |
last post by:
Is there any Framework classes that allow you to provide a URL as a string,
and determine whether it is a relative URL or literal URL?
Once that's determined, I'd then like to remove the protocol...
|
by: Nak |
last post by:
Hi there,
Does anyone know what path the AssemblyKeyFile attribute is relative to?
For example I currently have mine set to
<Assembly: AssemblyKeyFile("..\NicksKey.snk")>
Sometimes this...
| |
by: W1ld0ne [MCSD] |
last post by:
In VB6 dlls' I could get the path of the calling web site by using the COM+
class library and the ASP class library.
Does anyone have a clue how to do this in VB.Net
The objective is to have...
|
by: JJ |
last post by:
I'm confused about paths.
I have a functionn that uses the mappath method, which I think requires a
virtual path (is that the same as a relative path?).
But this doesn't always work as the...
|
by: chathura86 |
last post by:
I'm new to ASP.NET
i'm new to asp.net
i created a class which reads a xml file
placed the class in the app_code folder and placed the xml file in another folder
both folders are in the root
...
|
by: chathura86 |
last post by:
i have created some php classes in deferent folders which requires each other
i have given relative paths relative to those files
i used require_once()
but when i use those class in a file...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
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,...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |