Difference between revisions of "How do I track an image in .NET?"

From Market Ruler Help
Jump to: navigation, search
(Created page with '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" …')
(No difference)

Revision as of 18:04, 29 September 2009

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.