why doesn't EnableViewState work

Discussion in 'ASP .Net' started by Mike D, Apr 22, 2004.

  1. Mike D

    Mike D Guest

    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>
    Mike D, Apr 22, 2004
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:...
    > 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>
    Alvin Bruney [MVP], Apr 22, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. matt del vecchio

    EnableViewState="False" doesn't work?

    matt del vecchio, Jan 6, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    2,149
    Craig Deelsnyder
    Jan 7, 2004
  2. John Blair
    Replies:
    2
    Views:
    571
    John Blair
    Dec 27, 2004
  3. ibiza
    Replies:
    0
    Views:
    324
    ibiza
    Jan 30, 2006
  4. Mr. SweatyFinger
    Replies:
    2
    Views:
    1,739
    Smokey Grindel
    Dec 2, 2006
  5. stefan edlund

    <asp:Calendar, EnableViewState doesn't work

    stefan edlund, Dec 15, 2003, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    151
    Ken Cox [Microsoft MVP]
    Dec 16, 2003
Loading...

Share This Page