Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot view page in design view. 1

Status
Not open for further replies.

harmmeijer

Programmer
Mar 1, 2001
869
CN
When I try to see a page in design view I get the following message:
Could not open in Design view. Quote values differently inside a '<%...&quot;value&quot;...%>' block.
this is the code:
<asp:TemplateColumn HeaderText=&quot;<b>Open</b>&quot;>
<ItemTemplate>
<a href='openTemplate.aspx?ID=<%# DataBinder.Eval(Container.DataItem, &quot;ID&quot;) %>'&quot;>
Open
</a>
</ItemTemplate>
</asp:TemplateColumn>

I can change the code to:
<asp:TemplateColumn HeaderText=&quot;<b>Open</b>&quot;>
<ItemTemplate>
<a style=&quot;cursor:hand&quot; someID='<%# DataBinder.Eval(Container.DataItem, &quot;ID&quot;) %>' onclick=&quot;this.href='openTemplate.aspx?ID=' + this.url&quot;>
Open
</a>
</ItemTemplate>
</asp:TemplateColumn>

Is there another way of seeing the aspx page in design view, or do you have to put all db values the format: value='<%%>'?
 
Answer:
<asp:TemplateColumn HeaderText=&quot;<b>Open</b>&quot;>
<ItemTemplate>
<asp:HyperLink id=&quot;HyperLink1&quot; runat=&quot;server&quot; NavigateUrl='<%# &quot;openTemplate.aspx?ID=&quot; & DataBinder.Eval(Container.DataItem, &quot;ID&quot;) %>'>
Open
</asp:HyperLink>
</ItemTemplate>
</asp:TemplateColumn>
 
Unless I find it nessecary I try to work in design view all the time. That way you don't run into these little quirks. That'l do donkey, that'l do
[bravo] Mark
If you are unsure of forum etiquette check here faq796-2540
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top