search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

How to fill lable or textbox (.net2.0 + AJAX )

Asked by Ali Rassai
12 years ago.

I'm trying to fill a textbox or a lable (server side components) in any event e.g (Edit or delete) but it seems I can have lable1.text = "aaaaaaa"; does not do anything. Calander and textbox are in the same updatepanle, I have a feeling if I try to do this inside the daypilotcalander event it doesnt work. Am I miss anything? can anybody help???

Comment posted by Dan Letecky
12 years ago.

This should work fine but the event handling (e.g. EventClickHandling) must be set to PostBack.

You can' t reach other controls using CallBack events (UpdatePanel doesn't help in this case).

Comment posted by Ali Rassai
12 years ago.

Thanks for the reply.

Last question; Is there any way that I can raise an event with post back and have javascript simultaneously?

Comment posted by Dan Letecky
12 years ago.

Yes, it's possible. You have to switch to JavaScript handling and execute the PostBack from your code.

EventDelete example:

EventDeleteHandling="JavaScript" 
EventDeleteJavaScript="delete(e)"
<script type='text/javascript'>
function delete(e) {
  // your code here
  dpc1.eventDeletePostBack(e);
}
</script>
Comment posted by Ali Rassai
12 years ago.

Great, thankx; I did it.

This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.