PC Review


Reply
Thread Tools Rate Thread

Event Wiring

 
 
Google Jenny
Guest
Posts: n/a
 
      24th Sep 2004

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!
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic controls and event wiring =?Utf-8?B?SG9tYW0=?= Microsoft ASP .NET 0 16th Feb 2005 01:37 AM
Event Wiring Chris Fink Microsoft C# .NET 0 18th Feb 2004 06:18 PM
Problem with wiring an event to a dynamic LinkButton Bill Microsoft C# .NET 1 1st Dec 2003 06:43 AM
Assembly metadata and event wiring. Scott M Microsoft Dot NET 1 29th Aug 2003 02:54 PM
wiring up html attribute declared event handlers Oisin Grehan Microsoft ASP .NET 3 15th Jul 2003 11:27 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:34 AM.