Can not open the aspx page in Degsign View mode?

G

Guest

hey, all
This is a piece of code in my DataGrid, I just want to show a link in this
column. So I do it like this:
<asp:TemplateColumn HeaderText="De-active"> <ItemTemplate> <a
target=_self href="ScheduleStatusCheck.aspx?<%#
GetLink(DataBinder.Eval(Container, "DataItem.ID"), 0)%>">De-active</a>
</ItemTemplate>
</asp:TemplateColumn>
---------------------------------------------------
GetLink() is a public function.
But after I did this, when I go back to Design View mode, it says "Could not
open in Design View , Quote values differently inside a <%...."value".....%>"
block."
What does this error mean? How to work around this?
 
B

Brock Allen

Change:
target=_self href="ScheduleStatusCheck.aspx?<%#
GetLink(DataBinder.Eval(Container, "DataItem.ID"), 0)%>">De-active</a>

To:

target=_self href='ScheduleStatusCheck.aspx?<%#
GetLink(DataBinder.Eval(Container, "DataItem.ID"), 0)%>'>De-active</a>

Notice single quotes around the href attribute.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top