ListBox and round-trips

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
 
A

avnrao

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
 
M

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top