473,796 Members | 2,601 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ListBox and round-trips


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
Nov 18 '05 #1
2 1391
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 RegisterClientS criptBlock.

Av.
"Mike" <no****@nospam. com> wrote in message news:Op******** ******@tk2msftn gp13.phx.gbl...

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
Nov 18 '05 #2

Thanks a lot! I will look at the "RegisterClient ScriptBlock" option.
Mike
"avnrao" <av*@newsgroups .com> wrote in message news:OR******** *****@TK2MSFTNG P11.phx.gbl...
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 RegisterClientS criptBlock.

Av.
"Mike" <no****@nospam. com> wrote in message news:Op******** ******@tk2msftn gp13.phx.gbl...

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
Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
3134
by: amber | last post by:
Hello. Can someone tell me what I may be doing wrong here? I'm using the code (lboxRP is a listbox): Dim newRPindex As Integer newRPindex = Me.lboxRP.FindString(RP) Me.lboxRP.SetSelected(newRPindex, True) When the last line executes, I get an error message:
1
8600
by: Bish | last post by:
I want to create a .Net page with 2 controls. The 1st is a dropdown being populated from a database. The 2nd control is a listbox which is also populated from the same database but the content is dependent upon a selection from the dropdown control. I have no DB issues but being new to ..Net want a slick way to refresh my listbox control without taking a round trip to the server to requery my DB stored Proc each time I select a...
0
1522
by: Simon | last post by:
Newbie alert! I have a webform listbox with what I am sure is a common requirement. I wish to store a list of values but display a "translation" or decode. An example would be 1, 2, 3, 4 and One, Two, Three, Four I created class ListBoxSpecial { public string Code;
6
2883
by: Chris Leuty | last post by:
I am populating a multiselect Listbox from a dataset, with the content of the listbox filled by one table, and the selections determined from another table. So far, I have been keeping the dataset a denormalized mirror of the database, but I'm not having much luck getting the selection logic down (I haven't found a 'hook' where I can access the listbox object as an object to set the listitem's selected property before it gets rendered).. ...
0
906
by: VB Programmer | last post by:
I have a listbox that is doing a round trip postback every time I click on it. The problem is that when I click on, let's say the 10th item down, even though it visually shows up 1/3 way down the list box when the form is refreshed it is selected (which is good) BUT it shifts it to the top of the list box, with the previous 9 items unseen (above the 10th item). Any idea how I can keep it in the same position?
8
1496
by: gv | last post by:
Ok, Hi all, new to asp.net. Simple question with web forms I have a Dropdownlist and a listbox, I want to click on and item in the dropdownlist and show items in listbox. that simple I have this: I have two items in Dropdownlist. The Reportlist doesn't show
7
4539
by: Dave | last post by:
Hi all, After unsuccessfully trying to make my own dual listbox control out of arraylists, I decided to look for a 3rd party control. I've looked for over a week now and can't find anything but ASP.Net stuff when I need a Windows Form control. I've seen dual listbox populators in countless Windows applications, and have seen them run very fast, so I figured this would be extremely popular. Here's how it should work:
3
2299
by: Ali Chambers | last post by:
Hi, I have created a listbox called "dtlist1" on my VB.NET form. I call a procedure as follows: Private Sub openfile(flname As String) dtlist1.Items.Clear() etc..
2
3618
by: Mark Rae | last post by:
Hi, Looking for some advice again... Imagine two ListBox controls denoting something like students and team membership e.g. many students can be members of many teams (e.g. the hockey team, the football team, the athletics team etc). Team membership is managed on a standard web page with two ListBox controls - the one on the left shows which team(s) the student is not a
7
5622
by: Lit | last post by:
Hi, How can I capture the vertical scroll bar position for a Listbox. I have a Listbox of 100 items + when I click on it I post back remove the item selected. After returning to the client browser the list box scroll position is at the top.
0
10459
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10237
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10187
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9055
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6795
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5446
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5578
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4120
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3735
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.