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

  • Home
  • SEARCH
  • 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 6216733
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T07:18:08+00:00 2026-05-24T07:18:08+00:00

I am usually dealing with c# code , but recently developing a asp.net page

  • 0

I am usually dealing with c# code , but recently developing a asp.net page , I have a Calendar that Appears and the user selects the date he/she wants. On that page is a asp lbl that i would like to display the currently selected date, which is normally easy for me but i am having trouble referencing/finding the control . Also I am unsure of the best way to do achieve this and i’m sure to come across this problem in the future.

This is where I would like to set the lbl text and have tried using the FindControl method but it’s not working for me , thinking its possibly nested as i have some divs?.

 public void Calendar1_SelectionChanged(object sender, System.EventArgs e)
    {

        Control Lbl = FindControl("inputField");
        if (Lbl != null)
        {
            //Control mycontrol2 = Lbl.Parent;
            Lbl.Text = Calendar1.SelectedDate.ToShortDateString();
        }   

and this is in asp.

  <div id="date">


         <input type="text" size="12" id="inputField"   />
        <script>
            $("#inputField").click(function () {
                $("#box").show("slow");
            });
</script>
    </div>

How do I accomplish setting the inputfield text to the Calendar.SelectedDate ?.
(and any tips you have come across yourself if any, for good practice)

Thanks For any help.

  • 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-24T07:18:09+00:00Added an answer on May 24, 2026 at 7:18 am

    Any reason why you’re not using an asp:Label? You can’t find the “label” because it is an html control, aka a client side control. Use an <asp:Label id="lblCal" runat="server"... and you should have no problem changing its text in code behind:

    lblCal.Text = Calendar1.SelectedDate.ToShortDateString();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Usually, when dealing with Java IO code, here is what I wrote FileOutputStream out
I have a simple, but perplexing problem, with Math. The following code will take
I have run into a bit of a problem. Usually when dealing with UITableView
Usually, we install VS.NET on our production server, to solve problems easily with our
Usually when defining a DAO, you would have a setter for the datasource on
Usually I come across situations where I have to swallow an exception thrown by
I use to program mainly with C/C++, that's make me dealing with pointers and
I have a TableLayoutPanel that contains rows of labels. This control lives on form
I would like to determine, from a .NET application, whether the current user (from
Keeping classes loosely coupled is an important aspect of writing code that is easy

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.