Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 845813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T06:30:53+00:00 2026-05-15T06:30:53+00:00

I have the webform with dropdown list, label and textbox. Like below: <asp:DropDownList ID=ddlTest

  • 0

I have the webform with dropdown list, label and textbox. Like below:

<asp:DropDownList ID="ddlTest" runat="server" AutoPostBack="true">
</asp:DropDownList> 

<asp:Label ID="lblTest" runat="server" Text="Some text">
</asp:Label>
<asp:TextBox ID="edtTest" runat="server">
</asp:TextBox> 

I want to show/hide label and text box depending on the value selected on dropdown list. So I’ve added RadAjaxManader:

<rad:RadAjaxManager ID="RadAjaxManager1" runat="server">  
    <AjaxSettings>   
        <rad:AjaxSetting AjaxControlID="ddlTest">   
            <UpdatedControls> 
                <rad:AjaxUpdatedControl ControlID="lblTest" /> 
                <rad:AjaxUpdatedControl ControlID="edtTest" /> 
            </UpdatedControls> 
        </rad:AjaxSetting> 
    </AjaxSettings> 
</rad:RadAjaxManager>  

and procedure “SetupVisibility” which takes value from the dropdown list, does some walidations and desides whether to show or hide the label and the text box. When I use the procedure like this:

Protected Sub ddlTest_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddlTest.SelectedIndexChanged  
    SetupVisibility()  
End Sub 

it works good, but now I want to call SetupVisibility when the page is loaded:

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    SetupVisibility()
End Sub

The problem occurs in such a scenario:

  1. SetupVisibility() hides textbox and label while page is loaded.
  2. I change value on ddlTest dropdown list.
  3. SetupVisibility() wants to show textbox and label, but then I get the error: Microsoft JScript - runtime error: Cannot update control with ID: ctl00_CPH1_lblTest. The control does not exist. Where is the problem?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T06:30:54+00:00Added an answer on May 15, 2026 at 6:30 am

    I’ve solved the problem. I’ve wrapped the textbox and the label into div and panel:

    <div id="panelTest_DIV" runat="server">
      <asp:Panel ID="panelTest" runat="server">
        <asp:Label ID="lblTest" runat="server" Text="Some text..."></asp:Label><br />
        <asp:TextBox ID="edtTest" runat="server"></asp:TextBox>
      </asp:Panel>
    </div>
    

    and AjaxManager:

    <rad:AjaxSetting AjaxControlID="ddlTest">
      <UpdatedControls>
        <rad:AjaxUpdatedControl ControlID="panelTest_DIV" />
      </UpdatedControls>
    </rad:AjaxSetting>
    

    inside SetupVisibility() I set panelTest.Visibility. It solved the problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple ASP.NET web form as below: <form id=form1 runat=server> <asp:TextBox ID=txt
I have a web form with a dropdown list <asp:dropdownlist> , but for the
I have an ASP.NET webform on which I use a DropDownList control to allow
I have a dropdownlist on an ASP.NET web form. It is set to autopostback
I have 2 dropdown lists on my webform and using jquery trying to filter/reset
Consider the scenario where: an ASP.NET webform page has a DropDownList and a ListView.
I have a dropdownlist in ASP.NET Webforms that I want to calculate how many
Good day. I have a dropdown list control called audioList. Whenever the page loads
I'm writing an ASP.Net webform with some DropDownList controls on it. Then user changes
I have an ASP.NET WebForm with a number of DropDownLists, multiple select enabled ListBoxes,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.