Cannot find control on my page
Posted on 2006-10-25
OK, I added the following in my aspx page:
<p runat="server" id="paragraph1">some text is here....</p>
My codebehind (.cs) has this trying to reference this tag. Wehave thi working on other projects like this, same code. But for some reason I get "C:\directorywhatever\mypage.aspx.cs(68): The type or namespace name 'paragraph1' could not be found (are you missing a using directive or an assembly reference?)"
There is definitely no missing .dll, this is simply referencing an html server-side control now that I put runat="server" id="paragraph1" in that tag
I'm using VS 2003 to build, what could it be? Why isn't it finding that server tag?
I have othe rpages in thi sproject, aspx pages that are setup like this, and after adding that paragraph tag in, the code-behind for those other pages can see it fine. It's just on 2 of the pages that cannot find it like this, wondering if I need to add a reference somwhere to make VS 2003 aware of the control?