why doesn't EnableViewState work

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>
 
A

Alvin Bruney [MVP]

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?
 

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

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top