How do I track an image in .NET?

From Market Ruler Help
Revision as of 21:25, 4 February 2011 by Admin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Need to add link tracking to asp:button or asp:imagebutton tags in (.NET) from Microsoft.

Solution

Given a tag in .NET:

<asp:imagebutton  
     ID="Search" 
     Runat="server" 
     AlternateText="Start Search" 
     CausesValidation="False" 
     ImageUrl="/images/search.gif" 
     Height="25" Width="90" 
     OnClick="Search_Click" />

Add the ConversionRuler Link Tracking code to it:

<asp:imagebutton  
     ID="Search" 
     Runat="server" 
     AlternateText="Start Search" 
     CausesValidation="False" 
     ImageUrl="/images/search.gif" 
     Height="25" Width="90" 
     OnClick="Search_Click"
     OnClientClick="return (typeof cr_link != 'undefined') ? cr_link(this, 'XXX') : true"' />

If you have any further questions, contact us.