Solved

Capturing Date OnClick of ASP Calendar using Javascript

Posted on 2009-04-08
3
503 Views
Last Modified: 2012-05-06
I am using .NET 2003 ASP.NET calendar control in C# and ASP.NET and am trying to capture the date that user clicked on and bring that into a text box in another web form. Want to use java script. Any suggestions please.
0
Comment
Question by:dotnetpro
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 15

Expert Comment

by:spprivate
ID: 24098523
What you are using is a server side control and you want to do a javascript on this.
Ideal way would be to store the value in a cookie or session and on click of the calendar redirect to the next page and read the value from the cookie or session
0
 
LVL 1

Accepted Solution

by:
dotnetpro earned 0 total points
ID: 24099375
I see a bunch of rows with <href in them when i do a view source on the Calendar control...there has to be a way to hijack the __dopostback in javascript...
0
 
LVL 1

Author Comment

by:dotnetpro
ID: 24107979
Just passed ID of the textbox as a querystring at onclick with window.open and then on the target page
i did window.opener.document.forms(0)." + hdnctrl.Value + ".value = '"; where hdnctrl is the id of a hiden control that captures the id of previouspage textbox.and then ran self.close(). This script i registered with clientscriptblock under OnSelectionChanged() event of the calendar control..
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question