Im using an HTML Image control in a DataList. The reason for this is 
that I need the control to run a javascript function and if im not 
mistaken, this cannot be done by using a server side ASP control.

The simple task Im trying to do is at the ItemDataBound event of the 
DataList, the image control should become invisible.  Here's the code:

   Dim arrU As HtmlImage = CType(e.Item.FindControl("imgUp"),      
HtmlImage)  
   arrU.Visible = False

I get a Null object exception.  Apparently, the control could not be 
found even if the control exists.  I've used similar code to 
manipulate ASP Labels that are also inside the DataList and it works. 

What's wrong with my casting operation?  Can I use instead an ASP 
Image control and still be able to run a custom javascript function 
that is declared in my client script?

Thanks for your advice.
Jeff




------------------------ Yahoo! Groups Sponsor ---------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/saFolB/TM
---------------------------------------------------------------------~->

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
     [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/
 

Reply via email to