473,804 Members | 3,750 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Embed Resource. I can't figure this out.

Hello,

I have an assembly with customs controls, classes and handlers.I am
creating it as an ASP.NET 2.0 VS2005 Web Project

This one one of my handlers:

Namespace Web

Public Class SiteMap : Implements IHttpHandler

Public Sub ProcessRequest( ByVal context As HttpContext)
Implements IHttpHandler.Pr ocessRequest

Dim xslDoc As XslCompiledTran sform = New XslCompiledTran sform
xslDoc.Load(Pag e.ClientScript. GetWebResourceU rl(Me.GetType,
"MyProjectNames pace.Web.SiteMa p.xsl")) >>ERROR

End Sub
...

I get the error "Page is not declared".

I also have the code line "<Assembly:
System.Web.UI.W ebResource("MyP rojectNamespace .Web.SiteMap.xs l",
"text/xml")" in my AssemblyInfo.vb file.

And I set the Build Action of "SiteMap.xs l" to "Embedded Resource".

I have been reading documentation in internet but I can't find the
solution.

Could someone help me out?

Thank You,

Miguel

Nov 19 '06 #1
2 1656
See my reply:
http://forums.asp.net/thread/1470322.aspx

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke

"shapper" <md*****@gmail. comwrote in message
news:11******** **************@ m7g2000cwm.goog legroups.com...
Hello,

I have an assembly with customs controls, classes and handlers.I am
creating it as an ASP.NET 2.0 VS2005 Web Project

This one one of my handlers:

Namespace Web

Public Class SiteMap : Implements IHttpHandler

Public Sub ProcessRequest( ByVal context As HttpContext)
Implements IHttpHandler.Pr ocessRequest

Dim xslDoc As XslCompiledTran sform = New XslCompiledTran sform
xslDoc.Load(Pag e.ClientScript. GetWebResourceU rl(Me.GetType,
"MyProjectNames pace.Web.SiteMa p.xsl")) >>ERROR

End Sub
...

I get the error "Page is not declared".

I also have the code line "<Assembly:
System.Web.UI.W ebResource("MyP rojectNamespace .Web.SiteMap.xs l",
"text/xml")" in my AssemblyInfo.vb file.

And I set the Build Action of "SiteMap.xs l" to "Embedded Resource".

I have been reading documentation in internet but I can't find the
solution.

Could someone help me out?

Thank You,

Miguel

Nov 19 '06 #2
Hi,

I followed your example and I get an error:

Value cannot be null.
Parameter name: stylesheet

Maybe I am using this wrong?

My project namespace is: MyNM

I am using my resource file in:

----------------------
Namespace Web

Public Class SiteMap : Implements IHttpHandler

Public Sub ProcessRequest( ByVal context As HttpContext)
Implements IHttpHandler.Pr ocessRequest

Dim a As System.Reflecti on.Assembly = Me.GetType().As sembly
Dim s As Stream =
a.GetManifestRe sourceStream("M yNM.Web.SiteMap .xsl")
----------------------

My SiteMap.xsl is in a folder inside my project named "Assets/Web/"

In my AssemblyInfo.vb I have:

<Assembly: System.Web.UI.W ebResource("MyN M.Web.SiteMap.x sl",
"text/xml")>

Am I doing something wrong?

Thanks,

Miguel

Teemu Keiski wrote:
See my reply:
http://forums.asp.net/thread/1470322.aspx

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke

"shapper" <md*****@gmail. comwrote in message
news:11******** **************@ m7g2000cwm.goog legroups.com...
Hello,

I have an assembly with customs controls, classes and handlers.I am
creating it as an ASP.NET 2.0 VS2005 Web Project

This one one of my handlers:

Namespace Web

Public Class SiteMap : Implements IHttpHandler

Public Sub ProcessRequest( ByVal context As HttpContext)
Implements IHttpHandler.Pr ocessRequest

Dim xslDoc As XslCompiledTran sform = New XslCompiledTran sform
xslDoc.Load(Pag e.ClientScript. GetWebResourceU rl(Me.GetType,
"MyProjectNames pace.Web.SiteMa p.xsl")) >>ERROR

End Sub
...

I get the error "Page is not declared".

I also have the code line "<Assembly:
System.Web.UI.W ebResource("MyP rojectNamespace .Web.SiteMap.xs l",
"text/xml")" in my AssemblyInfo.vb file.

And I set the Build Action of "SiteMap.xs l" to "Embedded Resource".

I have been reading documentation in internet but I can't find the
solution.

Could someone help me out?

Thank You,

Miguel
Nov 19 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
4499
by: Anna | last post by:
Hi all. I want to embed the EMBED tag in the object tag. I understood that I need to provide a PARAM tag inside the OBJECT whose value will hold the content of EMBED src attribute, but after that I've got confused. For example, what should be put into classid and codebase attributes of the OBJECT now embedding the EMBED tag?
3
2232
by: M | last post by:
Hi Folks, Does anyone know how to embed a file into a resource in C#? You seem to be able to embed Icon, Bitmap, Cursor's & Strings. But how do you embed a file??? In VC++ version 6 you would, Find the Resource, Load It, get its size, and then write it out to where ever you want it.
7
4308
by: axis | last post by:
What I want to do is pretty simple: I have a bunch of icons in my application project (visual studio .net 2003), and I want to embed those in the executable, and access them through code. I've spent an hour browsing MSDN, and I still don't have a clear picture of how to do it. Documentation talks about ResourceManagers and other stuff, but as far as I can tell it talks about creating a dll, not in the executable itself. Thanks in...
2
7613
by: David | last post by:
Hello, I'm using an xml schema (xsd file) to validate input xml. This xsd is used by the C# dll and must be distributed with it. The xsd isn't modified. So I would like to embed it in the DLL so that I don't have to worry about the path where the file is stored... How do I embed the xsd file into my DLL? I know how to get the file back from resource using Assembly.GetExecutingAssembly() and assembly.GetManifestResourceStream(...) but I...
0
1002
by: scott.mankowitz | last post by:
Hi! Does anyone know if there is an easy way to embed fonts into a vb2005 application? Ideally, I would like to add the .ttf files as resources and just set the font using the forms designer. I can't seem to do that. I also tried to include the font as a resource and do this: This is part of the form_load sub
0
992
by: John | last post by:
Hi This is my question: I have an Exe and a .resource that i modify with Lutz Resourcer. I can't manage to embed the modified resource file in the exe with al.exe. al.exe myexe.exe /target:exe /out:newexewithnewres.exe /embed:myresource.resource
8
13670
by: CodeLeon | last post by:
Hi, All. I am creating a setup program. The way it works is that the user creates their setup info, my program generates the C# code for a setup executable, embeds the xml file containing the info for the setup, and compiles the whole thing into one EXE. How do i embed resources, and access them, into that assembly?
8
2552
by: Tomasz J | last post by:
Hello Developers, It may sound like a stupid question, but how to embed a resource in ASP.Net 2.0 web application? I mean, without using a separate library. There is no "build action" property. Thanks, Tomasz J
0
1555
by: VigneshS | last post by:
Hi, I am a newbie to Globalization and Localisation Concepts. I tried almost all the methods of the Globalization concepts. But i cannot be able to embed a text file within a Resource. My need is to open a solution programmatically, select a Project within, and get a source resource file. Then, select a number of cultures and create culture specific resources with the content of the source resource assembly. I aquired upto...
0
9584
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10323
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10082
tracyyun
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9160
agi2029
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7622
isladogs
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6854
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5525
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4301
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3822
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.