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. Advertisements

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. Johann Blake
    Replies:
    0
    Views:
    601
    Johann Blake
    Dec 17, 2003
  2. buran
    Replies:
    0
    Views:
    863
    buran
    Oct 31, 2005
  3. Rob Dob
    Replies:
    0
    Views:
    10,624
    Rob Dob
    Nov 27, 2005
  4. Arne Styve
    Replies:
    22
    Views:
    1,276
    steve
    Feb 22, 2006
  5. avishosh
    Replies:
    2
    Views:
    11,122
    avishosh
    Aug 8, 2004
  6. Nathan Sokalski
    Replies:
    2
    Views:
    620
    Nathan Sokalski
    Sep 14, 2008
  7. Nathan Sokalski

    Resource Files, Images, And The ImageUrl Property

    Nathan Sokalski, Sep 14, 2008, in forum: ASP .Net Building Controls
    Replies:
    3
    Views:
    1,462
    Allen Chen [MSFT]
    Sep 16, 2008
  8. Rob Dob
    Replies:
    0
    Views:
    453
    Rob Dob
    Nov 27, 2005
Loading...