RE: enable viewstate for only one control on the page

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Tom,

You have to put the enableviewstate property of the page to false:

<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" EnableViewState="false"
AutoEventWireup="false" Inherits="WebApplication1.WebForm1" %>

And then you have to put the enableviewstate property of the dropdown
control to true:

<asp:DropDownList EnableViewState=True id="DropDownList1" style="Z-INDEX:
102; LEFT: 424px; POSITION: absolute; TOP:
88px"runat="server"></asp:DropDownList>


Pablo

"thomasamillergoogle@xxxxxxxxx" wrote:

> I have a page that has hundreds of textboxes added dynamically by
> writing out "<input type = text name=ctl_99>". In other words, these
> are NOT asp.net web controls.
>
> I want to enable viewstate for only ONE control, it is a dropdown
> called drpOrg. This dropdown IS an asp.net web control.
>
> Please help.
>
> Tom
>
>
.



Relevant Pages

  • Re: enable viewstate for only one control on the page
    ... > And then you have to put the enableviewstate property of the dropdown ... >> are NOT asp.net web controls. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Dropdown list and postback error
    ... i use a gridview control and few dropdown list(all ... The GridView uses object data source for data access. ... All my web controls have ID's assigned. ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)
  • Re: Transfer data from one Content Control to another Word 2007 VB
    ... Dim cc1PtMedication As ContentControl ... incorporates a dropdown list. ... you can just assign the text of one control directly to the text ... macro transfers the contents of room 1 to the controls for room 3, ...
    (microsoft.public.word.vba.beginners)
  • Re: Create control with drop-down similar to ComboBox
    ... problem (more or less I am changing the control size on dropdown, ... a parent large enough to hold the entire dropdown). ... Find great Windows Forms articles in Windows Forms Tips and Tricks ... private void button1_Click ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Data List Insert new problem
    ... Microsoft MSDN Online Support Lead ... I try this solution but it dosen't seems to work so I changed the dropdown ... So for the control display the color lists you selected from database, ... Now when I'm selecting let say GN_ID 35 in the the drop down ...
    (microsoft.public.dotnet.framework.aspnet)