 |
BOOK: Professional ASP.NET 1.0, Special Edition/1.1  | This is the forum to discuss the Wrox book Professional ASP.NET 1.1 by Alex Homer, Dave Sussman, Rob Howard, Brian Francis, Karli Watson, Richard Anderson; ISBN: 9780764558900 |
|
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Professional ASP.NET 1.0, Special Edition/1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|
|

March 18th, 2004, 05:10 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Trrrrrring, yes I guess it does ;)
I guess that the component is not aware of its "Web environment". That is, for all the component knows, it could be used in a desktop app or Pocket PC application as well.
So, the component doesn't know where MapPath comes from, probably doesn't even know what it does.
To successfully tell the component about the fact it's participating in a Web application, you can have it get a reference to the current Http Context, like this:
string myString = System.Web.HttpContext.Current.Server.MapPath("Bla .txt");
Would you mind starting a new thread for a new issue? Makes a thread a bit more on-topic....
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

March 18th, 2004, 05:29 PM
|
|
Registered User
|
|
Join Date: Mar 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Imar:
Thanks for the response. The sample I read that used MapPath was so generic I didn't know it's usage differed by context.
Anyway, I have setup a seperate forum on the subject. Maybe you can stop by and make suggestions.
Thanks
P.S. The title of the topic is error BC30451: Name 'MapPath' is not declared.
|
|

October 23rd, 2004, 05:32 AM
|
|
Registered User
|
|
Join Date: Oct 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
hi,
I have just joined the the forum, I thought that u all can solve some problem of mine.
i m using command prompt to compile the asp.net code behind (or may say the code which i write in . vb file)
first I compile one . vb file then i use the dll of I first . vb file(class) in other . vb file
for eg
imports xyz
'this is the dll which i made using command prompt
Now I want to use it but I m getting an error
err:bc30466 namespace or type "xyz" cannot be found
Please help me with this
Its preety urgent
regards and thanx in advance
abhishek
|
|

October 23rd, 2004, 08:44 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi there,
I am not sure what you're talking about. Where do you get this error? How are you using the DLL? Can you describe your setup in more detail?
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Frantic by Metallica (From the album: St.Anger) What's This?
|
|

December 7th, 2004, 06:58 PM
|
|
Registered User
|
|
Join Date: Dec 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Imar,
I am trying to compile my vb.net project from command line using vbc.exe
I have some crystal reports in my project
I am able to compile the project, but the crystal reports give the following error
"Unable to find the report in the manifest resources. Please build the project, and try again. "
I researched a little bit and found out I need to embed these reports in the assembly using the /resource switch in the vbc.exe.
But the resource file needs to be of .res extension.
The only files corresponding to the reports are the .rpt and . vb file created along with it
I included both of them in the reseource switch.But I get the same error.How do I embed the reports in the assembly?
Thanks
Jagruthi
|
|

December 8th, 2004, 02:40 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi Jagruthi,
Thanks for your personal message. I answer here if you don't mind.
I think you need to embed your resources using the /res option and then use the fully qualified namespace for the embedded resources. Here's something that worked for me to embed a .bmp file:
/res:ToolboxImages\ContentEditor.bmp,Spaanjaars.Too lkit.ContentEditor.bmp
The first instance of .bmp is the file name, the other the namespace.
Then check out this FAQ to see where and how your resources ended up:
http://Imar.Spaanjaars.Com/QuickDocID.aspx?QUICKDOC=291
Did you also include the associated . vb or .cs files required by the report?
If all else fails, you *could* deploy the .rpt files and then use Server.MapPath to just load them.
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|
 |