How to run a function when text is clicked?  
Author Message
KalyanNarra





PostPosted: Sun Jul 03 13:12:14 CDT 2005 Top

ASP.Net >> How to run a function when text is clicked?

Hello,

I have an Asp:Image inside a datagrid:

<asp:ImageButton runat="server" ImageUrl="img.jpg" CommandName='<%#
DataBinder.Eval(Container.DataItem, "product_id") %>'
OnCommand="Change_Product" Width="50"></asp:ImageButton>

When the image is clicked the function Change_Product runs and uses the
value of product_id.

I want to do something similar but instead of displaying an image that
can be clicked I want to display some text. Is this possible?

I was looking at asp:abel properties but I couldn't find a way to do
this.

Can someone help me?

Thanks,
Miguel

Web Programming94  
 
 
Karl





PostPosted: Sun Jul 03 13:12:14 CDT 2005 Top

ASP.Net >> How to run a function when text is clicked? use an asp:linkbutton ?

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)




> Hello,
>
> I have an Asp:Image inside a datagrid:
>
> <asp:ImageButton runat="server" ImageUrl="img.jpg" CommandName='<%#
> DataBinder.Eval(Container.DataItem, "product_id") %>'
> OnCommand="Change_Product" Width="50"></asp:ImageButton>
>
> When the image is clicked the function Change_Product runs and uses the
> value of product_id.
>
> I want to do something similar but instead of displaying an image that can
> be clicked I want to display some text. Is this possible?
>
> I was looking at asp:abel properties but I couldn't find a way to do this.
>
> Can someone help me?
>
> Thanks,
> Miguel
>