473,753 Members | 8,053 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ascx / dhtml events bubbling up to ctl event

Hi,

I've decided to try to reduce duplicate code and simplify a seriously
complicated page I have by using web user controls.

My problem is; one of the controls contained within my new ascx, needs to
update the page when ever it changes. In appreciation for encapsulation, I
do not want to call a page level javascript function from an internal
control ... I want it as self contained as possible.

Is there anyway to add a dhtml event to my ascx? For example, is there
anyway to add a js event handler to my ascx control declaration? Like the
onchange event in the following? :
------------------------
<mine:MyCtl id="myctl1" onchange="myctl 1_onChange();" runat="server"/>
------------------------

Is there a best practice for this type of situation?

Thanks in advance,
John

BTW-This is different than my last question.
Nov 19 '05 #1
1 1381
Never mind.

I've been bouncing this around all day, but as soon as I ask ... I figure it
out.

Thanks anyway.
John
"John" <Pl*********@se nd.me.spam.com> wrote in message
news:NE******** ***********@new s20.bellglobal. com...
Hi,

I've decided to try to reduce duplicate code and simplify a seriously
complicated page I have by using web user controls.

My problem is; one of the controls contained within my new ascx, needs to
update the page when ever it changes. In appreciation for encapsulation,
I do not want to call a page level javascript function from an internal
control ... I want it as self contained as possible.

Is there anyway to add a dhtml event to my ascx? For example, is there
anyway to add a js event handler to my ascx control declaration? Like the
onchange event in the following? :
------------------------
<mine:MyCtl id="myctl1" onchange="myctl 1_onChange();" runat="server"/>
------------------------

Is there a best practice for this type of situation?

Thanks in advance,
John

BTW-This is different than my last question.

Nov 19 '05 #2

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

Similar topics

2
2234
by: DaRik | last post by:
Hi, I'm having some difficulties with a menu I'm making. I build up the menu through DOM. I append childnodes to a tree. 2 types of children are possible: url (a hyperlink) and sub (a submap). The tree is thus of a structure main |-url1
1
3412
by: Mark Szlazak | last post by:
Is there a way to detect if an textarea onscroll event is working in Firefox (or Mozilla). I know that there is an onscroll event bubbling bug with current vesions of these browsers so I want to detect this problem with a test like "if (textarea.onscroll == 'undefined' || !textarea.onscroll) {}." Any help would be appreciated.
3
1371
by: VK | last post by:
To PointedEars with my deep respect. Author ;-) There were a question a while ago about events. Now I see that my original explanation was not full. Check this sample out: <html> <head> <title>Event test</title>
6
9942
by: Cockroach | last post by:
Hello, I have a problem where the onClick of a table row will activates a window.location event, and inside a cell in that row, an image onClick event shows/hides a div. The problem is that when you click on the image, it briefly shows the div, and then reloads the page to the window.location url. Is there a way of preventing the onClick of the row (<tr>) from doing
7
2691
by: Colin Young | last post by:
I have a UserControl that contains a calendar control. The calendar is not raising events (month navigation, date selections, etc.). I've checked that the OnSelectionChanged event has a handler being registered. Is there anything else obvious or otherwise that I've missed? Is there a problem using it in a UserControl? Thanks Colin
1
9940
by: Anonieko | last post by:
I know Visual Studio lacked support on easily writing code to raise events from a ascx user control ( because you have to hand write them). (http://codebetter.com/blogs/brendan.tompkins/archive/2004/10/06/27795.aspx) Question: Is it better and easier now in ASPNET 2.0 , meaning VS 2005?
1
2745
by: Christian Sengstock | last post by:
Hi all, i have a js application with several event handlers which i manage via prototype .bindAsEventListener. On normal page navigation ( link navigation ) i finish all events handlers (onUnload) if a new page should be loaded and everything works fine: All event handlers are finished and the new page works fine. However, if i do a browser "reload" the events a fired twice after it.
3
4939
by: MikeK | last post by:
Ok, I've been noodling with this for several days now and I'm starting to go crazy. Does Apple's Safari browser support drag events on Textarea elements? The few specs and docs I've found seem to indicate that it does but I can't get it to work for the life of me. I've tired everything I can think of to try get notifications for the events: ondragenter ondragleave ondragover ondrop
5
1543
by: =?Utf-8?B?UGF1bA==?= | last post by:
Hello, I am aware that in ASP.NET there is the concept of event bubbling. What I am after is some advice on achieveing the same thing in a standard application. Say I have 3 classes. View, Controller and Model. View calls Controller and then Controller calls Model. I would like Model to raise events which the View can handle.
0
9072
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
9653
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
9451
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
9421
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
9333
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
8328
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...
1
6869
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6151
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
4771
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...

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.