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 6661621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:18:09+00:00 2026-05-26T02:18:09+00:00

I want to set the textbox contol located in the panel control via code

  • 0

I want to set the textbox contol located in the panel control via code

I know to retrieve the inputted value in the textbox control:

string myVal = Request.Form["txtResult"]; 

I want to set the txtResult.text = “some text”;

makeup snippet:

<asp:Panel ID="Panel1" runat="server" Style="display: none" Width="233px">
       <asp:TextBox ID="txtResult" runat="server" AutoPostBack="True"></asp:TextBox>
   <br />
   <div align="center">
      <asp:Button ID="OkButton" runat="server" Text="OK" />
      <asp:Button ID="CancelButton" runat="server" Text="Cancel" />
   </div>
   </asp:Panel>

txtResult is not available within code, I tried to see if it is available in the page_load, it’s not

texReults was a typo, its txtResult, I updated the ID

the intellisense does not recognize any cntr by the name txtResult

its a new web application and the panel visibility=True

maybee this wil help, above the snipet, I use ScriptManager from the AJAX Exstension

I am aware of he Asnchronius affects, partial potback, etc.

  • 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-26T02:18:10+00:00Added an answer on May 26, 2026 at 2:18 am

    It’s a managed control, you should be able to set it on the Page_Load event:

    protected void Page_Load(object sender, System.EventArgs e)
    {
        txtResult.Text = "some text";
    }
    

    Update: Based on your update, there are a couple of things that you would need to check:

    • Spelling: Are you sure you’re spelling the control name correctly?
      Its ID in your code is “txtResults”, but you’re referencing it as
      “txtResult”.
    • Designer: Did you copy the aspx page or bypass VS in some way for this page? If so check the .designer file for the reference to the control: i.e. “Page1.aspx.designer.cs”
    • Visibility: Is the Panel control’s visibility set to true? If not, then it won’t render the controls that are contained within it.

    Update 2: If you’re doing this through scriptmanager, then I highly recommend that you read through this: http://www.wrox.com/WileyCDA/Section/Using-the-ASP-NET-AJAX-ScriptManager.id-305492.html

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

Sidebar

Related Questions

I want to set the UpdateSourceTrigger to an event of a control: <TextBox Text={Binding
I want to set the width of one particular textbox in my view. No
I want to set the tabIndex property for a row of textbox(s) that are
I have <asp:TextBox runat=server ID=lastName /> on a page and I want to set
I have a CustomValidator control and within the OnServerValidate event i want to set
I have MyTextBox which is derived from TextBox. I want to set Binding Option
I want to create a user control [textbox] which convert all the text in
What I want to do is set the focus to a specific control (specifically
All I want to do is set a textbox or label's text to something
I have an aspx page with an input textbox control for which i want

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.