By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,952 Members | 1,091 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,952 IT Pros & Developers. It's quick & easy.

Strange behavior with images, .resource files - System.Resources.MissingManifestResourceException

P: n/a
I have a Windows Form control that I have embedded in an ASP.NET page.
I now have the need to catch an event from the control on the webpage.

After researching the situation I found that this is the way to expose
events. I added the following code to my class.

Imports System.IO
Imports Assetta.ColumnStyles
Imports ICSharpCode.SharpZipLib.Zip.Compression
Imports ICSharpCode.SharpZipLib.Zip.Compression.Streams
Imports System.Runtime.InteropServices
Public Delegate Sub EventHandler(ByVal intVersionId As Integer)

<GuidAttribute("B2157CA4-9127-4EE0-A4C1-DDD424CEE484"), _
InterfaceTypeAttribute(ComInterfaceType.InterfaceI sIDispatch)> _
Public Interface ControlEvents
' Add DisIdAttribute to any members in the source interface to
specify the COM DISPID.
<DispIdAttribute(1)> _
Sub SaveComplete(ByVal intId As Integer)
End Interface

<ComSourceInterfaces(GetType(ControlEvents)), _
ClassInterface(ClassInterfaceType.None)> _
Public Class SaveClass

This code works in a sample project that I got from the Microsoft site.
When I incorporate it to my project the following line causes an error.
This is in InitializeComponent()

Me.imgPageDown.Image = CType(resources.GetObject("imgPageDown.Image"),

The exception is:

After researching this error I think something is wrong with the
..resource files. If I remove the lines my component works.

Is there an easier way to catch an event on the web or does anyone have
a solution that will let me run my code?



Nov 20 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.