Thursday, March 22, 2012

ListBox and round-trips

Hello,
I have a web user control that contains a ListBox. I would like to display s
ome 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 lit
tle bit worried about round-trip to the web server. Every time the user clic
ks on an item, a round-trip to the server is made. Is there a better solutio
n to avoid these round-trips?
Thanks.
Mikeif you want to use code behind and process the double click event on the ser
ver 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 wri
te the script and post it using RegisterClientScriptBlock.
Av.
"Mike" <nospam@.nospam.com> wrote in message news:OpfP6iaMEHA.1484@.tk2msftngp
13.phx.gbl...
Hello,
I have a web user control that contains a ListBox. I would like to display s
ome 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 lit
tle bit worried about round-trip to the web server. Every time the user clic
ks on an item, a round-trip to the server is made. Is there a better solutio
n to avoid these round-trips?
Thanks.
Mike
Thanks a lot! I will look at the "RegisterClientScriptBlock" option.
Mike
"avnrao" <avn@.newsgroups.com> wrote in message news:ORCx68aMEHA.936@.TK2MSFTN
GP11.phx.gbl...
if you want to use code behind and process the double click event on the ser
ver 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 wri
te the script and post it using RegisterClientScriptBlock.
Av.
"Mike" <nospam@.nospam.com> wrote in message news:OpfP6iaMEHA.1484@.tk2msftngp
13.phx.gbl...
Hello,
I have a web user control that contains a ListBox. I would like to display s
ome 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 lit
tle bit worried about round-trip to the web server. Every time the user clic
ks on an item, a round-trip to the server is made. Is there a better solutio
n to avoid these round-trips?
Thanks.
Mike

0 comments:

Post a Comment