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="Bl ack"
border="3"
style="border-color:Black;bor der-width:3px;borde r-style:solid;hei ght:159
px;width:888px; border-collapse:collap se;">
<tr>
<td style="backgrou nd-color:Transpare nt;">
<table width="100%">
<tr>
<td>
</td>
<td align="center">
<button style="WIDTH: 100px; COLOR: black; HEIGHT: 20px;
BACKGROUND-COLOR:
yellow" id="Course_Butt on1" onfiltered="Cou rse_Button_Clic k"
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_C lick is not defined although
I
have it in the code-behind. If I just drop a button on the page with
Course_Button_C lick as the click event handler, it works. What do I have
to
do to connect Course_Button1 with Course_Button_C lick? I tried:
this.Course_But ton1.Click += new
System.EventHan dler(this.Cours e_Button_Click) ;
in the InitializeCompo nent 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!