ListBox and round-trips

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

Hello,

I have a web user control that contains a ListBox. I would like to display some information based on the double-clicking of the user on a ListBox's item. I was thinking about some code behind procedure to do that, but I am a little bit worried about round-trip to the web server. Every time the user clicks on an item, a round-trip to the server is made. Is there a better solution to avoid these round-trips?

Thanks.
Mike
 
if you want to use code behind and process the double click event on the server side, you dont have a chance other than post back.
if you want to put in some client-side script to do the process, you can write the script and post it using RegisterClientScriptBlock.

Av.

Hello,

I have a web user control that contains a ListBox. I would like to display some information based on the double-clicking of the user on a ListBox's item. I was thinking about some code behind procedure to do that, but I am a little bit worried about round-trip to the web server. Every time the user clicks on an item, a round-trip to the server is made. Is there a better solution to avoid these round-trips?

Thanks.
Mike
 
Thanks a lot! I will look at the "RegisterClientScriptBlock" option.
Mike


if you want to use code behind and process the double click event on the server side, you dont have a chance other than post back.
if you want to put in some client-side script to do the process, you can write the script and post it using RegisterClientScriptBlock.

Av.

Hello,

I have a web user control that contains a ListBox. I would like to display some information based on the double-clicking of the user on a ListBox's item. I was thinking about some code behind procedure to do that, but I am a little bit worried about round-trip to the web server. Every time the user clicks on an item, a round-trip to the server is made. Is there a better solution to avoid these round-trips?

Thanks.
Mike
 
Back
Top