I am using the control in "Scheduler" mode. The left most column holds the day. As the control is generated, I am adding a link button that calls a javascript method which, in turn, causes a post back to display an ajax modal popup with detailed information.
The markup produced is this:
<td align='right'><img src='../images/SkyLight/preview.png' alt='' tooltip='Display this day in list form' onmouseover='this.style.cursor=\"hand\"' onclick='DisplayList(\"05/08/2011\")' /></td>
And here is the javascript method:
function DisplayList(lstDate) {
var txtRow = "ctl00_mainContent_txtListDate";
document.getElementById(txtRow).value = lstDate;
// Performs a postback without causing a refresh to the page.
// WebForm_PostBackOptions Arguments: eventTarget, eventArgument, validation, validationGroup, actionUrl, trackFocus, clientSubmit
WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions('ctl00_mainContent_txtListDate', '', false, '', '', false, true));
}
All of this is in .Net 3.5 using C#. The code behind uses the value in txtListDate to query the database and generate a list, which is then displayed to the user via an Ajax modal popup.
Is there a better way to do this?
I apologize for not being able to display the full source as I am not at my development system right now. I can provide more details if needed.
Thanks -Mark