Help: Could not open aspx page in Design View

G

Guest

Hello
I'm receiving the following error message when I try to view an aspx page in Design view
"Could not open in Design View. Quote values differently inside a '<%... "value" ... %>' block

Below is the html in the page using the <%..."value" ...%> syntax

<ItemTemplate><tr><td style="background:white;font-weight:bold;font-style:italic;" width="20%"><%# DataBinder.Eval(Container, "DataItem.ReportName") %></td><td style="background:white;" width="60%"><%# DataBinder.Eval(Container, "DataItem.Description") %></td><td style="background:white;" width="10%"><%# DataBinder.Eval(Container, "DataItem.First_Name") %><%# DataBinder.Eval(Container, "DataItem.Last_Name") %></td><td width="10%"><a href="#" onclick="showReport(<%# DataBinder.Eval(Container, "DataItem.ReportID") %>);">view</a> |
<a href="..\CustomReportMaker.aspx?id=<%# DataBinder.Eval(Container, "DataItem.ReportID") %>&mode=edit">edit</a></td></tr></ItemTemplate><AlternatingItemTemplate><tr><td style="background:#E4EBF5;font-weight:bold;font-style:italic;" width="20%"><%# DataBinder.Eval(Container, "DataItem.ReportName") %></td><td style="background:#E4EBF5;" width="60%"><%# DataBinder.Eval(Container, "DataItem.Description") %></td><td style="background:#E4EBF5;" width="10%"><%# DataBinder.Eval(Container, "DataItem.First_Name") %><%# DataBinder.Eval(Container, "DataItem.Last_Name") %></td><td width="10%"><a href="#" onclick="showReport(<%# DataBinder.Eval(Container, "DataItem.ReportID") %>);">view</a> |
<a href="..\CustomReportMaker.aspx?id=<%# DataBinder.Eval(Container, "DataItem.ReportID") %>&mode=edit">edit</a></td></tr></AlternatingItemTemplate

--------------------------------------------------------------------------------

Does anyone know how to fix this error? Maybe I'm missing something obvious
Thanks for any help or suggestions

Donni
 
D

dm_dal

Hmmm...

Looking at the following line:
<a href="#" onclick="showReport(<%# DataBinder.Eval(Container,
"DataItem.ReportID") %>);">view</a>

You should single quote the onclick='showReport(<%#
DataBinder.Eval(Container,"DataItem.ReportID")%>)'

and any other place you use the same; If you have any Text="<%#
DataBinder.........%>" you will also want to replace those double quotes
with single quotes: Text = '<%# DataBinder........%>'

You also have some a href="" with the DataBinder encapsulated within them.
You'll need to replace the double quotes with single quotes there as well.

Hope this helps.
David Young

Donnie said:
Hello,
I'm receiving the following error message when I try to view an aspx page in Design view:
"Could not open in Design View. Quote values differently inside a '<%... "value" ... %>' block"

Below is the html in the page using the <%..."value" ...%> syntax:

<ItemTemplate><tr><td
style="background:white;font-weight:bold;font-style:italic;" width="20%"><%#
DataBinder.Eval(Container, "DataItem.ReportName") %></td><td
style="background:white;" width="60%"><%# DataBinder.Eval(Container,
"DataItem.Description") %></td><td style="background:white;" width="10%"><%#
DataBinder.Eval(Container, "DataItem.First_Name") %><%#
DataBinder.Eval(Container, "DataItem.Last_Name") %></td><td width="10%"><a
href="#" onclick="showReport(<%# DataBinder.Eval(Container,
DataItem.ReportID") %>);">view said:
<a href="..\CustomReportMaker.aspx?id=<%# DataBinder.Eval(Container,
"DataItem.ReportID")
%>&mode=edit">edit</a></td></tr></ItemTemplate><AlternatingItemTemplate><tr>
<td style="background:#E4EBF5;font-weight:bold;font-style:italic;"
width="20%"><%# DataBinder.Eval(Container, "DataItem.ReportName") %></td><td
style="background:#E4EBF5;" width="60%"><%# DataBinder.Eval(Container,
"DataItem.Description") %></td><td style="background:#E4EBF5;"
width="10%"><%# DataBinder.Eval(Container, "DataItem.First_Name") %><%#
DataBinder.Eval(Container, "DataItem.Last_Name") %></td><td width="10%"><a
href="#" onclick="showReport(<%# DataBinder.Eval(Container,
 

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,774
Messages
2,569,599
Members
45,177
Latest member
OrderGlucea
Top