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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:44:07+00:00 2026-06-10T10:44:07+00:00

How can I get hold a session from date picker? For all my textbox,

  • 0

How can I get hold a session from date picker?

For all my textbox, I hold it using :

 Session["location"] = DropDownList1.SelectedItem.Text;
 Session["time"] = DropDownList2.SelectedItem.Text;
 Session["day"] = DropDownList3.SelectedItem.Text;  
 Session["IsChauffeurUsed"] = DropDownList4.SelectedItem.Text;

But for my text box date picker, when I write the code

 Session["date"] = datepicker.Text;

It gives me an error, the current context does not exist.
The date picker text box is :

<div class="demo"><p>Date: <input type="text" id="datepicker"></p></div>

Hope you can help.

Thanks.

  • 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-06-10T10:44:09+00:00Added an answer on June 10, 2026 at 10:44 am

    Set runat=server attribute to convert html tag to Html server control.

    <input type="text" runat="server" id="datepicker">
    

    and use value attribute because it is now ASP.NET Web Server control.

    Session["date"] = datepicker.Value;
    

    Edit: This works perfectly on my side.

    <head runat="server">
        <title></title>
        <link rel="Stylesheet" type="text/css" href="http://code.jquery.com/ui/jquery-ui-git.css" />
        <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
        <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/jquery-ui.min.js"></script>
        <script type="text/javascript">
            $(function () {
                $("#datePicker").datepicker();
                $("#<%=TextBox1.ClientID %>").datepicker();
            });
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
            <input type="text" id="datePicker" runat="server" />
            <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
        </div>
        </form>
    </body>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using AspectJ, I can get hold of the singleton instance of an aspect using
How can I get hold of a user's GEO location within my ASP.NET application?
How can I programmatically refresh Visual Studio Solution Explorer? I can get a hold
Can get all triples with value null in specific field? All people with date_of_birth
You can get a list of databases using PRAGMA database_list or a list of
Hi How can I get hold of elements within a Div that uses a
How can I get hold of the matching route for a url in rails?
I have a Session which I am using to hold items in a form
How can I get hold of a column or row of a 2D Array
How can I get a hold on the h2 span element? div#content div.view-content div.view-row-item

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.