473,320 Members | 1,865 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,320 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 1071

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: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
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
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.