Yes I re-read pg 758 a few minutes after posting this message and realized
that the 'Protected WithEvents head1 As
System.Web.UI.HtmlControls.HtmlGenericControl' statement was missing.
After MANUALLY adding it (I thought this was supposed to be automatic.), my
code ran. So my question remains: Is there an IDE bug?
(Incidentally I didn't load the samples because I wanted to enter the code
directly from the book, the better to understand it. I just loaded the
samples and my page is basically identical with the sample so I suppose I
didn't make any major mistakes.)
"Juan T. Llibre" wrote:
re: First of all, I assume the reference to 'head1' requires me to
modify the HTML as follows: <HEAD id="head1" runat=server>
That reference may be to an HTMLGenericControl whose id is "head1".
See page 758.
The complete code for the examples is in the companion CD.
You might want to install the sample code.
Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
"B. Chernick" <BC*******@discussions.microsoft.com> wrote in message
news:C3**********************************@microsof t.com...I am studying Chapter 15 in the 70-305/315 book. I'm trying to do the
example on Pgs 750-751, the dropdown list example.
Aside from the problem that the example cannot be run as written, I'm having
a problem with VS that makes me wonder if there's a bug in the system.
First of all, I assume the reference to 'head1' requires me to modify the
HTML as follows: <HEAD id="head1" runat=server>
There are times when if I switch between design and HTML views, the
runat=server attribute simply vanishes. In any case I cannot compile because
the system does not recognize 'head1', no matter what I do. (The squiggly
error lines under head1 in the codebehind won't go away.)
What's even crazier is that I've already gotten this to work once. I was
simply trying to recreate the original for a demo so I could show the crash.
Any ideas?