why doesn't EnableViewState work

  • Thread starter Thread starter Mike D
  • Start date Start date
M

Mike D

This is becoming very painful to learn. I am going through a wrox
book and trying the code. My aspx pages continue to come back with my
selection highlighted. It looks like EnableViewState is not being set
to False.

What gives here I am in Chapter 4 and simple things are failing?

Mike



Here is the page.
<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="WebForm1.aspx.vb" Inherits="test2.WebForm1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
<meta name="CODE_LANGUAGE" content="Visual Basic 7.0">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<asp:DropDownList id="DropDownList1" style="Z-INDEX: 101; LEFT:
115px; POSITION: absolute; TOP: 163px" runat="server" Width="154px"
Height="67px" EnableViewState="False">
<asp:ListItem>Item 1</asp:ListItem>
<asp:ListItem>Item 2</asp:ListItem>
<asp:ListItem>Item 3</asp:ListItem>
<asp:ListItem>Item 4</asp:ListItem>
</asp:DropDownList>
<asp:ListBox id="ListBox1" style="Z-INDEX: 102; LEFT: 94px;
POSITION: absolute; TOP: 233px" runat="server" Width="125px"
Height="120px" EnableViewState="False" SelectionMode="Multiple">
<asp:ListItem Value="qwdqdq">qwdqdq</asp:ListItem>
<asp:ListItem Value="qwdqdqw">qwdqdqw</asp:ListItem>
<asp:ListItem Value="sex">sex</asp:ListItem>
<asp:ListItem Value="qdwqdqqwdqw">qdwqdqqwdqw</asp:ListItem>
</asp:ListBox>
<INPUT style="Z-INDEX: 103; LEFT: 81px; WIDTH: 180px; POSITION:
absolute; TOP: 388px; HEIGHT: 38px" type="submit" value="Submit">
</form>
</body>
</HTML>
 
i suggest strongly that if you are learning from scratch it would be worth
your while to start with the code behind model instead of the inline thing.
it's the new paradigm and their are several solid reasons for it.

What exactly is not working?
 
Back
Top