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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T01:08:12+00:00 2026-06-04T01:08:12+00:00

I have a view with datepicker control on it and couple of partial views

  • 0

I have a view with datepicker control on it and couple of partial views on the page. The date is set to today’s date by default in the ViewData of the controller and is used to display when the page loads. When the user changes the date in the date picker, how do I pass the selected value from Jquery variable to Controller’s ViewData and update all the partial views?

  • 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-04T01:08:13+00:00Added an answer on June 4, 2026 at 1:08 am

    The date picker control is just an HTML element that has some associated javascript to help the user select a date. It’s completely client side which means that it runs on the browser (e.g. IE, Firefox, Chrome). ViewData is a temporary store that can be populated by your server side code (e.g. C#) in the controller action, and then used within a view to generate the HTML response that will get sent to the client browser. You cannot therefore pass a jQuery variable to the ViewData, it just doesn’t make sense.

    If you want to update the parts of the page that was generated by your partials, you have a couple of options.

    (a) do a postback passing the datetime back to a controller action and refresh the entire page (pretty simple but might not give a good user experience depending on what you are trying to do).

    (b) use Ajax to update the sections of the page that you want to (more involved but can give a better user experience).

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

Sidebar

Related Questions

Inside the Views -> Shared folder I have the DateTime.ascx partial view; <%@ Control
I have created a web custom control and used within an aspx page. I
I have this code in my view. $(#Effective Date).datepicker({ showOn: button, buttonText: ... });
I have a UIDatePicker on my view,I have set DatePicker in time mode. bydefault
I have a view controller which contains a field for user to enter date
I have a DatePicker working on a View which also has a ViewModel associated
I have view controller, into the view i have put a table view, and
i have view controller which contains a button which show the image library ,if
I have view page with both detailview and gridview the grid view should be
I have a view containing a segmented controller and a UIDatePicker that only shows

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.