473,406 Members | 2,619 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,406 software developers and data experts.

Event Wiring


I am relatively new to MSVS and am stuck on event wiring. I have a web
application and the screen contains a DataList. Inside the template, I
am
creating either a button or just text, depending on the data for that
cell.
The HTML looks like:

<DIV style="DISPLAY: inline; Z-INDEX: 101; LEFT: 8px; OVERFLOW: auto;
WIDTH:
904px; POSITION: absolute; TOP: 112px; HEIGHT: 288px"
ms_positioning="FlowLayout">

<table id="DataList1" cellspacing="0" rules="all" bordercolor="Black"
border="3"
style="border-color:Black;border-width:3px;border-style:solid;height:159
px;width:888px;border-collapse:collapse;">
<tr>
<td style="background-color:Transparent;">
<table width="100%">
<tr>
<td>
</td>
<td align="center">
<button style="WIDTH: 100px; COLOR: black; HEIGHT: 20px;
BACKGROUND-COLOR:
yellow" id="Course_Button1" onfiltered="Course_Button_Click"
runat="server"><strong> MD005 </strong> </button></td>
..
..
..

The <button is something that is not visible at compile time since it is
returned as a string by a function within a script on the page. When I
click
on the button, it says that Course_Button_Click is not defined although
I
have it in the code-behind. If I just drop a button on the page with
Course_Button_Click as the click event handler, it works. What do I have
to
do to connect Course_Button1 with Course_Button_Click? I tried:

this.Course_Button1.Click += new
System.EventHandler(this.Course_Button_Click);

in the InitializeComponent but it says that Course_Button1 is not set to
an
instance of an object.

Thanks in advance.

Google Jenny

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #1
0 1075

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

Similar topics

1
by: Scott M | last post by:
I'm building a smart client application based off of the example that is posted on windowsforms.com (and shown on the .NET show). A windows form calls a webservice that itterates through a...
0
by: Chris Fink | last post by:
I am writing a c# unattended windows application and I would like to write an event to handle any type of application error by gracefully degrading and writing a message to an error log. Errors...
0
by: Plumer | last post by:
A warm, south pacific good morning to everyone I posted this message on one of the other MSDN newsgroups (Messaging & Collaboration) and realised later that perhaps it wasn't the best choice. If I...
7
by: Oisin Grehan | last post by:
Hi, I have a UserControl derived class: <ns:votingbutton runat="server" id="btn1" onclick="votingbuttonclick" /> My question is, what code do I need in place in the codebehind for this to...
4
by: The Alchemist | last post by:
I am having a problem with a dynamically-generated Datagrid. It is important to point out that this problem does not exist with a design-time created Datagrid, but only with a dynamically generated...
0
by: Homam | last post by:
To wire a Click event handler to a dynamically-added control (e.g. LinkButton), you need to do so during the Load event of the parent (e.g. a PlaceHolder). The problem is, the Click event...
9
by: Marcelo Cabrera | last post by:
Hi, I have a user control that in turn creates a bunch of webcontrols dynamically and handles the events these webcontrols raise. It used to work fine on ASP .Net 1.1 but when compiled on 2.0 it...
0
by: Demetri | last post by:
I have created a web control that can be rendered as either a linkbutton or a button. It is a ConfirmButton control that allows a developer to force a user to confirm if they intended to click it...
0
by: jesse james 2020 | last post by:
I cannot get viewstate nor can I wire up events to child controls... Any thoughts are appreciated. Example code is below: public class SelectCashFlowPeriods:Table { const int DROPDOWNWIDTH =...
5
by: Andrew Robinson | last post by:
I have a page that can load a number of different user controls. Each of these user controls inherits from a common base class and the controls are loaded based on application state, status, etc...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
0
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,...
0
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...
0
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...
0
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...
0
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,...
0
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...

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.