473,905 Members | 6,187 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Urgent: Trigger javascript function after bind control

Hi All,

I've a problem here, I want to trigger a javascript function after binding
the ListBox control. Basically the javascript will remove the duplicates
records after recordset is bind in the ListBox control automatically without
users onclick/onchange the ListBox.

I don't want to distinct the records in the SQL query, because I have other
usage for those duplicates records.

How can this be done? Please help, thanks in advance.
Jun 7 '06 #1
3 2219
Hi Mae,

Does it have to be client-side and right after binding the control?

It's hard to get into a server-side event like that to do client-side stuff.

Why not loop through the items collection on the server-side to remove the
duplicates?

Or, what about running the JavaScript immediately after the page is loaded?
That's far safer:

http://msdn2.microsoft.com/en-us/lib...tupscript.aspx

Ken
Microsoft MVP [ASP.NET]

"Mae Lim" <Ma****@discuss ions.microsoft. com> wrote in message
news:59******** *************** ***********@mic rosoft.com...
Hi All,

I've a problem here, I want to trigger a javascript function after binding
the ListBox control. Basically the javascript will remove the duplicates
records after recordset is bind in the ListBox control automatically
without
users onclick/onchange the ListBox.

I don't want to distinct the records in the SQL query, because I have
other
usage for those duplicates records.

How can this be done? Please help, thanks in advance.

Jun 7 '06 #2

Ken Cox [Microsoft MVP] wrote:
Hi Mae,

Does it have to be client-side and right after binding the control?

It's hard to get into a server-side event like that to do client-side stuff.

Why not loop through the items collection on the server-side to remove the
duplicates?

Or, what about running the JavaScript immediately after the page is loaded?
That's far safer:

http://msdn2.microsoft.com/en-us/lib...tupscript.aspx

Ken
Microsoft MVP [ASP.NET]

"Mae Lim" <Ma****@discuss ions.microsoft. com> wrote in message
news:59******** *************** ***********@mic rosoft.com...
Hi All,

I've a problem here, I want to trigger a javascript function after binding
the ListBox control. Basically the javascript will remove the duplicates
records after recordset is bind in the ListBox control automatically
without
users onclick/onchange the ListBox.

I don't want to distinct the records in the SQL query, because I have
other
usage for those duplicates records.

How can this be done? Please help, thanks in advance.


Can you not use two SQL queries one that returns distinct rows and one
that doesn't and use them accordingly.

Jun 7 '06 #3

Rather than maintaining 2 SPs, could you use the create a DataView from
the binded DataSet? In other words apply your DataView (where you
remove the duplicates) to the DataSet and then bind your list box to the
DataView?

Bill Gregg
MCP, MCAD
*** Sent via Developersdex http://www.developersdex.com ***
Jun 7 '06 #4

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

Similar topics

0
277
by: Frustrated | last post by:
I have an application that we are porting from Unmanaged C++ to VB.NET that involves sockets. There are two pieces to the code. One piece is a one to one TCP call to a server which is working fine. The second piece receives streaming data from the server on a regular basis via UDP. My problem is that I can not make the ReceiveFrom call work. This code is multithreaded and I don't know if that has any bearing on it or not. First off,...
4
4306
by: John | last post by:
Hi all, This really is quite an urgent matter. I have a page with multiple, dynamically-loaded user controls and when a user clicks on a button, the whole form is submitted. Now at this stage I know I need to call a function that will save data but I'm not sure exactly when to call this function. I've tried two ways and both seem to have 'gotcha's':
9
2186
by: Moe Sizlak | last post by:
Hi There, I am trying to write the selected value of a listcontrol when a button is clicked and I keep getting the error "object not set to a reference of an object". The libox itself is in a usercontrol and all i'm really needing to do is get the selected value when the button is clicked on the form. Can someone tell what I need to include in my page to get this working ? Moe <><
1
4957
by: Bob | last post by:
Hi, Hope you can help me with this one. I'm at my wits end. I'm trying to create an intelligent edit-box like the excellent "Customer" one at the URL: http://munich.schwarz-interactive.de/autocomplete.aspx
1
1731
kaleeswaran
by: kaleeswaran | last post by:
this is my trigger function but when i tried to run the pgm the error shows like this: PLS-00049: bad bind variable 'NEW.SNO' PLS-00049: bad bind variable 'OLD.SNO' PLS-00049: bad bind variable 'OLD.SNO'so tell me the reason plzzzzzzzz CREATE OR REPLACE TRIGGER TRIKAL BEFORE INSERT OR UPDATE OR DELETE ON SAMPLE FOR EACH ROW
4
1926
by: ashasivan | last post by:
Hi, Please help me as soon as possible for the following problem. It is very very urgent. I have an XML file as follows: <?xml version="1.0" standalone="yes"?> <Employee> <em name="Asha" id="1"> <details>456</details>
0
1742
by: imran haq | last post by:
Hi All, I have 3 rather Long Questions that are causing alot of trouble: I would appreciate all the help i can get and tried to use A post sent to atli in the past but it did not help... !) I have an events table, within the events table I have 7 columns, Alias varchar (30) Progress int(1) Val double Stamp timestamp
1
7045
by: daonho | last post by:
I tried to use javascript to trigger up the button click function when user press enter key from the textbox. This function work fine with a single button click such has login page. However, if the page has multiple button such login page with a search function somewhere around, then it's not respond properly. I have attached a brief example of two text boxes and two button. When ever a key is press on textbox one, I want to trigger...
2
6979
by: pankajsingh5k | last post by:
Dear All, Please help me... I had read an article to lazy load a tab in a tabcontainer using an update panel on http://mattberseth.com/blog/2007/07/how_to_lazyload_tabpanels_with.html and i am implementing it in my website....
0
10013
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11310
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
10894
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...
0
10516
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9703
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
7228
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
5915
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...
1
4748
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
4322
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.