Results 1 to 2 of 2

Thread: Custom User Control Problem

  1. #1

    Thread Starter
    Registered User
    Join Date
    Jul 2002
    Posts
    80

    Question Custom User Control Problem

    I am having problems initializing my custom user control. I keep getting the following error:

    Specified cast is not valid.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.InvalidCastException: Specified cast is not valid.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:


    [InvalidCastException: Specified cast is not valid.]
    WylePricingSystem.HeaderInfo.Page_Load(Object sender, EventArgs e) in \\station5\wwwroot$\WylePricingSystem\NewLaborEst.aspx.vb:105
    System.Web.UI.Control.OnLoad(EventArgs e)
    System.Web.UI.Control.LoadRecursive()
    System.Web.UI.Page.ProcessRequestMain()

    I've attached my code. Can someone please help me?

    Thanks,

    James
    Attached Files Attached Files

  2. #2
    C# Aficionado Lord_Rat's Avatar
    Join Date
    Sep 2001
    Location
    Cave
    Posts
    2,497
    I attempted to look at your code.

    Because you concatenated multiple files, and truncated parts, I cannot determine what your file is doing and where it is failing.

    Please combine the original files, in their unmodified forms (blank out any user names, however -- but don't delete any lines) and put them in a zip file as your attachment. It will make it easier to read.

    Do note, however, that your error message is clearly telling you that you have a problem on line 105 of \\station5\wwwroot$\WylePricingSystem\NewLaborEst.aspx.vb
    Need to re-register ASP.NET?
    C:\WINNT\Microsoft.NET\Framework\v#VERSIONNUMBER#\aspnet_regiis -i

    (Edit #VERSIONNUMBER# as needed - do a DIR if you don't know)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width