Hello Kevin,
when u use visible=fasle your control is out from the list of Page elements.
To keep your control but hide it use object.style.visibility, (if doesn't
mix up with style.display property)
KB> I have a test script right now that I'm fighting with. The idea is
KB> to "simply" have an aspx page with 3 panels, to show 3 "different"
KB> forms and then a 4th panel to show the results of processing these
KB> forms.
KB>
KB> One of the panels will contain DropDownLists, who's items are
KB> dynamically added in terms of text and values. For example, one of
KB> these lists will be languages. I want to list presented in the
KB> language of the person viewing it, i.e. if they are visiting out
KB> French website, they see "Français", but if they are on our UK
KB> website they see "French". The value will always be "French".
KB>
KB> The problem I'm find is that when the panel with the DropDownList is
KB> not visible, then I cannot access the .Text property of the list. In
KB> the code below, I have a DropDownList called "testList", and right
KB> at the end of the code I do a Response.Write to show testList.Text;
KB> but this will only work when panel3.Visible = true.
KB>
KB> Naturally this isn't going to work, as if my 3 forms (in panels 1, 2
KB> & 3) are going to work properly, they must be hidden until required,
KB> and once the form fields on panel3 are completed, they should all be
KB> hidden.
KB>
KB> Is there any way to change the code below to make this work even if
KB> the panel holding the DropDownList is hidden?
KB>
KB> Many thanks
KB>
KB> Here's the code:
KB>
KB> <body>
KB> <script runat="server">
KB> public string usernameString = string.Empty;
KB> private void Page_Load(object sender, EventArgs e)
KB> {
KB> usernameString = Request["username"];
KB> hideAllPanels();
KB>
KB> if (!IsPostBack)
KB> {
KB> panel1.Visible = true;
KB> }
KB> }
KB> private void button_click(object sender,
KB> System.Web.UI.WebControls.CommandEventArgs e)
KB> {
KB> if (e.CommandName == "show_panel2")
KB> {
KB> panel2.Visible = true;
KB> }
KB> else if(e.CommandName == "show_panel3")
KB> {
KB> panel3.Visible = true;
KB> }
KB> else if(e.CommandName == "show_panel4")
KB> {
KB> panel3.Visible = false;
KB> panel4.Visible = true;
KB> }
KB> }
KB> private void hideAllPanels() {
KB> panel1.Visible = false;
KB> panel2.Visible = false;
KB> panel3.Visible = false;
KB> panel4.Visible = false;
KB> }
KB> </script>
KB> <%
KB> %>
KB> <form action="" method="post" name="pageform" id="pageform"
KB> runat="server">
KB> <asp:Panel ID="panel1" runat="server" Wrap="true">
KB> <h2>Panel 1</h2>
KB> <asp:TextBox ID="username" runat="server" />
KB> <asp:RequiredFieldValidator id="RequiredFieldValidator1"
KB> CssClass="smallFontRed" runat="server" Height="8px"
KB> ErrorMessage="This
KB> field is required"
KB> ControlToValidate="username"></asp:RequiredFieldValidator>
KB> <asp:Button ID="show_panel2" CommandName="show_panel2"
KB> OnCommand="button_click" runat="server" Text="Next >" />
KB> </asp:Panel>
KB> <asp:Panel ID="panel2" runat="server" Wrap="true">
KB> <h2>Panel 2</h2>
KB> <asp:CheckBox ID="textCheckBox" runat="server" Value="as test"
KB> Text="booyah" />
KB> <asp:Button ID="show_panel3" CommandName="show_panel3"
KB> OnCommand="button_click" runat="server" Text="Next >" />
KB> </asp:Panel>
KB> <asp:Panel ID="panel3" runat="server" Wrap="true">
KB> <h2>Panel 3</h2>
KB> <%
KB> ListItem languageSelectItem = new
KB> ListItem("TextToAppear","ValueToUse");
KB> textList.Items.Add(languageSelectItem);
KB> %>
KB> <asp

ropDownList ID="textList" runat="server"
KB> EnableViewState="false"></asp

ropDownList>
KB> <asp:Button ID="show_panel4" CommandName="show_panel4"
KB> OnCommand="button_click" runat="server" Text="Finish" />
KB> </asp:Panel>
KB> <asp:Panel ID="panel4" runat="server" Wrap="true">
KB> <%
KB> Response.Write(username.Text + " - " + textCheckBox.Text + " - " +
KB> textList.Text);
KB> %>
KB> </asp:Panel>
KB> </form>
KB> </body>
KB>
---
WBR,
Michael Nemtsev :: blog:
http://spaces.msn.com/laflour
"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche