Home > DeveloperSection > Forums > how to use data binder inside anchor tags
jacob rasel
jacob rasel

Total Post:88

Posted on    March-12-2013 2:30 AM

 C# C# 

 1 Reply(s)
 867  View(s)
Rate this:

Hi Mindstickians!

I have anchor tag in asp.net repeater I want to be to embed data binder to add to href to create light-box

error Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and

modify your source code appropriately.

Compiler Error Message: CS1002: ; expected

Source Error:

<a href="editReminders.aspx?reminderID=<% DataBinder.Eval(Container.DataItem, >"ReminderID") %>" shape="rect" > class="extLink">Edite</a>   

I hope you short-out my problem ASAP.
Thanks in advance!


Total Post:604

Posted on    March-12-2013 8:44 AM

Hi Jacob!

bind data inside anchor tags as following

add # character to % to be

 <a href="editReminders.aspx?reminderID=<%# DataBinder.Eval(Container.DataItem, "ReminderID") %>" shape="rect" class="extLink">Edite</a>

I hope it helpful for you

Don't want to miss updates? Please click the below button!

Follow MindStick