Hi, I want to trigger if the user did a double click or a click on the dayview control. If this happend I have to fill up a variable in the session object. How to get this event server side in den aspx code behind? I try to use the propertie event window of the dayview control but I get only the client side jscript event. Is there no server side event? If it is so, how can I feel up my session object and decide if there was a click on a exsiting appointment or on a free space in the dayview in jscript?
thx in advance
regards tim mischkin
There is no server side event. The only way to do this is to use the client side event the write the Javascript needed to create your variable and pass is back to the server.
As for passing it back to the server side of things what you can do is set up a hidden variable and in the dbl click function set the value and then use it in the code.
As for determining if the click was on an exsisting appointment or a blank space. Appointments have an object called keys. A key is basically the ID of the appoinment. In your Javascript you can check if the appointment is there with an if statement. However I didn't do this in the dble click event I did it in the WebScheduleInfo dialog opening event. I dont know if you are opening a dialog page though.
if (oActivity.getDataKey() == null)
sorry but your solution don't work.I have to store information about the click in the calendar in my session variables.like which day, which time and so on.If I use a html hidden input there is no server side event which will be fired on value change or something like this. If I use a asp hidden field there is a server side event called value change but this won't be firedalso.In a summary I can say after redirect to another page I lost all information in cause of I'm not ableto can't safe them in my session object and to do this I need a indicator which trigger server side with all information about the calendar click to fill up the session object.
I think he was refering to something along these lines when he was talking about hidden field, this would cause a postback (server side event to fire) and still be in the same session.<style type='text/css'>.HideObject{display:none;)</style>
<script type='text/javascript'>function EventClick(){//use clientevents of webschedule dialogopening and cancel.document.getElementById('eventinfo').value = 'information about event';__doPostBack('eventTrigger.ClientID', '');}</script>
<input type='hidden' id='eventinfo' runat='server' value='' /><asp:LinkButton runat="server" ID="eventTrigger" Text="" CssClass="HideObject"></asp:LinkButton>
in code behind sub for onclick for eventTriggermyvalue = eventInfo.value write session information with myvalue / or parse it up and do more with it.end sub for onclick
if you pass the key to the hidden field then you can get the appointment object from the key