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

Discussion in 'ASP .Net' started by Gene, Nov 16, 2005.

  1. Gene

    Gene Guest

    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)

    '--BEGIN--
    <GuidAttribute("B2157CA4-9127-4EE0-A4C1-DDD424CEE484"), _
    InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIDispatch)> _
    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
    '--END--

    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"),
    System.Drawing.Image)

    The exception is:
    System.Resources.MissingManifestResourceException

    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?

    Thanks!

    Gene
    Gene, Nov 16, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. buran
    Replies:
    0
    Views:
    728
    buran
    Oct 31, 2005
  2. Rob Dob
    Replies:
    0
    Views:
    10,426
    Rob Dob
    Nov 27, 2005
  3. =?Utf-8?B?QWxleGFuZGVyIEtvbGV2?=

    MissingManifestResourceException raised

    =?Utf-8?B?QWxleGFuZGVyIEtvbGV2?=, Apr 11, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    520
    =?Utf-8?B?QWxleGFuZGVyIEtvbGV2?=
    Apr 11, 2006
  4. avishosh
    Replies:
    2
    Views:
    10,569
    avishosh
    Aug 8, 2004
  5. Rob Dob
    Replies:
    0
    Views:
    342
    Rob Dob
    Nov 27, 2005
Loading...

Share This Page