Results 1 to 2 of 2

Thread: Errors @ Inherits in aspx pages.

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2001
    Location
    MA, US
    Posts
    78

    Errors @ Inherits in aspx pages.

    Hi,
    I have some hard time tring to understand how to make the inherits to work.
    I created an empty page TestPrompt.aspx in an Test_Speech_1 project, added an control, setup some properties and tried the page. It come back with error "could not load type:Test_Speech_1.TestPrompt" on this line:

    <%@ Page Language="vb" AutoEventWireup="false" Codebehind="TestPrompt.aspx.vb" Inherits="Test_Speech_1.TestPrompt" %>

    from what I understood, into the "code behind" code it define a class TestPrompt. Something is missing, or ... It seems that I need to create an namespace "Test_Speech_1.TestPrompt"?
    If yes, what is the syntax?
    If not, what means Inherits="Test_Speech_1.TestPrompt" from the definition line?

    Thank you,

    Sorin

  2. #2
    C# Aficionado Lord_Rat's Avatar
    Join Date
    Sep 2001
    Location
    Cave
    Posts
    2,497
    It needs to find a class by that name in the codebhind file, or, in your ROOT directory for the Site, in a dll file in the BIN folder.

    The prefix (in your case Test_Speech_1) usually is not even evaluated. The ending is all that is evaluated and in most cases, if you remove the first part, you can deploy your solution to pretty much anywhere.
    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