ASP.NET error : CS0426: The type name 'SiteMaster' does not exist in the type 'System.Web.UI.WebControls.ImageButton'


  • Hi all,


    I am newbie in ASP.NET and I need your help with a problem.

    I created a new item called ASP.NET File with Master Page and I wrote :



    <%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="ImageButton._Default" %>
    <%@ Import Namespace="System.Web" %>
    <asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
    <script runat="server">
        private void button1_click(object source, EventArgs e)
            span1.InnerHtml = "You clicked on the button";
    <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
       <button id="button1" onclick="button1_onclick" onmouseover="'yellow'" onmouseout="'white'" style="font: 8pt; background-color:'Aqua'" runat="server">
       Some Text Here
       <img src="Wheel2.gif" alt="" /> 
       <br />
       <span id="span1" runat="server"></span>

    When I launch web browser, it returns :

    CS0426: The type name 'SiteMaster' does not exist in the type 'System.Web.UI.WebControls.ImageButton'
    Source File: c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\7a913024\15a1d008\App_Web_site.master.cdcab7d2.rb897ch2.0.cs    Line: 179


    How could I solve this ?


    Thank you


    Wednesday, October 12, 2011 8:58 AM

All replies