Hi Ron,
You can refer to Assembly.GetMan ifestResourceSt ream method, it will read
the resource into a stream.
Then you can use filestream to operate it as you like.
For details, please refer to:
http://www.codeproject.com/dotnet/em...asp?print=true http://www.devx.com/dotnet/Article/10831/0/page/2
Also, you can use ResourceManager Class to retrieve embedded resources at
run time.
You can visit:
http://msdn.microsoft.com/library/de...us/vbcon/html/
vbtskretrieving resourceswithre sourcemanager.a sp
If you still have anything unclear, please feel free to let me know.
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--------------------
| From: "Ron Vecchi" <rv*****@xilehd vecchi.com>
| Subject: Text file as embedded resource
| Date: Mon, 20 Oct 2003 18:45:32 -0400
| Lines: 16
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.3790.0
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Message-ID: <O4************ **@tk2msftngp13 .phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
| NNTP-Posting-Host: pcp02828467pcs. roylok01.mi.com cast.net 68.85.156.233
| Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!tk2 msftngp13.phx.g bl
| Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.csharp:1927 11
| X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
|
| I have a text file(.js) that holds a buch of java script code that is
| rendered in some web controls all part of a larger webcontrol library.
|
| The file is rather large. Would embedding this resouce in the application
| be relevant in this situation. I know I can chage the build type to
| embedded resource but really dont know what this does. Besides that it
| embeds it in the assembly ;-). I'm pretty quick.
|
| How can I read the text file once its embedded though. Like I metioned
| there are a couple webcontrols that use this text file and render out some
| of the contents.
|
| Thanks,
| Ron
|
|
|