'Default_master' does not contain a definition for bHome

G

Ganesh

I get this error Error 1 'Default_master' does not contain a definition for
'bHome' . I cannot find out the error, someone can help me.


default.master

<%@ Master Language="C#" CodeFile="Default.master.cs"
Inherits="Default_master" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head runat="server">
<title></title>
</head>
<body>

<form id="form1" runat="server">

<div class="header" style="left: 0px; top: 0px; height: 80px; width:
1200px; background-color: #3ba30a;">
<h1 style="left: 1px; top: 1px; background-color: #3ba30a;">
<span style="color: #ffffff">PlusForAll.Com<span
style="font-size: 10pt">(Simple way
to find property)<asp:TextBox ID="TextBox1"
runat="server"></asp:TextBox><br />
</span></span>
&nbsp;<asp:Button ID="bHome" runat="server" Text="Home"
Width="100px" OnClick="bHome_Click" />
</div>

<asp:contentplaceholder id="Main" runat="server" OnLoad="Main_Load" />

<div class="footerbg">
<div class="footer">
&nbsp;</div>
</div>

</form>

</body>
</html>


Default.master.cs



using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;



public partial class Default_master : System.Web.UI.MasterPage
{


protected void Page_Load(object sender, EventArgs e)
{
this.bHome.Visible = true;

}



}
 
L

Lit

This is a feature,

try to delete it then recreate it.

Lit


Ganesh said:
intellisense show when i type this. it comes with bHome but i cannot
build.


"Peter Bromberg [C# MVP]" <[email protected]>
wrote in message
You are correct. I didn't see "bHome" declared anywhere. So what's the
question? If it's not there, you cannot expect to use it.
-- Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top