Can't switch to Design View in VS.Net 2003

S

Saber

I've a repeater and here is a piece of HTML when I use, I can't switch back
to Design view:
<a href=default.aspx?id=<%#container.dataitem("id")%>Some Link</a>

I get this error message:
Could not open in design view. Place quotes around a '<% %>' used as an
attribute value or within a <SELECT> element.

well, actually I used <% %> as an attribute value, why I shouldn't?
would you suggest an alternative?
 
T

Tomas Petricek

Try placing quotes around <% %> :)
Like this:
<a href='default.aspx?id=<%#container.dataitem("id")%>'>Some Link</a>

Tomas Petricek
Microsoft C# MVP

-----Original Message-----
From: Saber [mailto:saber[--AT--]maghalat.com]
Posted At: Saturday, July 31, 2004 11:29 PM
Posted To: microsoft.public.dotnet.framework.aspnet
Conversation: Can't switch to Design View in VS.Net 2003
Subject: Can't switch to Design View in VS.Net 2003

I've a repeater and here is a piece of HTML when I use, I can't switch
back
to Design view:
<a href=default.aspx?id=<%#container.dataitem("id")%>Some Link</a>

I get this error message:
Could not open in design view. Place quotes around a '<% %>' used as an
attribute value or within a <SELECT> element.

well, actually I used <% %> as an attribute value, why I shouldn't?
would you suggest an alternative?
 

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,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top