473,382 Members | 1,646 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

tag attributes not showing up for events

KJ
I have developed some ascx controls using VS2005.

Some of these controls have public events. I would like to reference
these events by name as attributes in the tag of the control where it
is used.

For example, the control's code declares:

public event VoidIntDelegate OnAssetChosen;

When the control is used, I'd like this event to show up in the tag and
auto wire up the event:

<KJ:AssetChooser runat="server" ID="ac1"
OnAssetChosen="MyEventHandler"/>

But the complier doesn't like this. It carps that the attribute (of the
tag) is not valid. The interesting thing is that this does with with
properties. For example:

<KJ:AssetChooser runat="server" ID="ac1" MyProperty="AValue"/>

Anyone know how to make this work with events (without using the += C#
wiring up in the code of the caller)?

-TIA

Aug 24 '06 #1
0 868

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

Similar topics

0
by: gcash | last post by:
I'm having problems with some attributes in Internet Explorer. I'm trying to figure out how to set things up so I don't have to do my own event loop even though I'm using DispatchWithEvents() ...
3
by: xAvailx | last post by:
I apologize ahead of time for the long post... Background: Working on a CRM type custom application. The application is for an event management company. The company will provide the application...
5
by: Flipje | last post by:
In my view, there is a major drawback to using attributes: the getter and the setter have identical protection levels. But I usually want the getter to be public and the setter to be protected or...
6
by: Mark Broadbent | last post by:
This might sound like a bit of a stupid statement (no change there then!) to some of the gurus, but am I the only one left a bit flustered by what appears to be around ten zillion attributes (and...
2
by: Showjumper | last post by:
I have a problem. Somecontrol.Attributes.Add is not working for me nor is page.registerclientscriptblock. I have created a script using the stringbuilder class. Then when i try to register it on...
1
by: Dhruba Bandopadhyay | last post by:
I know that JavaScript lets us add: ondragenter, ondragover, ondragleave, ondrop events to normal HTML table td tags. This lets us do highlighting of table cells/rows, and capture drag & drop...
11
by: Nathan Sokalski | last post by:
I add several JavaScript events (onchange, onkeypress, etc.) to Controls using the Add method of the Attributes collection. However, if the JavaScript code contains certain characters, such as & or...
1
by: Max | last post by:
Hello everyone! I would want to know if reserved attributes (xml:lang, xml:space, xmlns:prefix etc.) are parsed and registered as normal attributes. As an example: xmlns:cc="http://namespace"...
2
by: Safalra | last post by:
Recently I've rewritten much of my old Javascript code to use DOM functions so that enhancements can be attached to documents without needing to alter the HTML code. I assumed that adding event...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.