473,387 Members | 1,520 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

why doesn't EnableViewState work

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>
Nov 18 '05 #1
1 1745
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?

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
"Mike D" <ak*****@hotmail.com> wrote in message
news:9f**************************@posting.google.c om...
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>

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Jarod | last post by:
hey I tried to make ASP.Net site with a datagrid. On the dg there is a button columnt with command set to select. I put in the code some very simple ItemCommandEvent. In the ... generated code...
1
by: | last post by:
The following code: Private Sub ClearControls(ByVal ctrl As Control) Dim i As Int32 For i = ctrl.Controls.Count - 1 To 0 Step -1 ClearControls(ctrl.Controls(i))
2
by: michele | last post by:
Hi, i'm using a datagrid control in my webform, with AutoGenerateColumns=false; it work very well if EnableViewState=true; including paging and sorting, but this cause a big performance issue, so...
0
by: Michael Baker | last post by:
Overriding the view state in web.config for various locations never worked for me before. However, i just tested it on my machine after the 1.1 sp1 framework upgrade and it appears to work now. I...
1
by: AC | last post by:
Hello, All Is it possible to set enableViewState='true' for single control on a page with enableViewState='false'. In particular I am interested in DropDownList, but neither using IDE to set...
3
by: Joe | last post by:
Hello all: From what I understand the ItemCommand, UpdateCommand, SortCommand, etc events for the datagrid require that the datagrid's enableVireState property is set to true. Does the...
2
by: Calvin KD | last post by:
Hi everyone, I have a datagrid to display search results. The search results at this stage we only return the first 500 records to speed up the search. The problem is, if I turn the...
3
by: | last post by:
Here is an interesting one. If I disable viewstate in the web.config file, but enable it on a specific page, it doesnt save the viewstate on postbacks. I have to actually enable it in web.config. ...
3
by: JohnZing | last post by:
I Have EnableViewState="false" in the top of my page has you can see below <%@ Page Language="VB" EnableViewState="false" MasterPageFile="~/MasterPage.master" AutoEventWireup="false...... I...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.