Éric Moreau
asked on
Could not open in Design view
I have this line in a WebForm
<tr valign="top"
id="<%# DataBinder.Eval(Container. DataItem, "idNatureComptable") %>"
onmouseover="document.all( '<%# DataBinder.Eval(Container. DataItem, "idNatureComptable") %>').style.background='d3d 3d3'"
</tr>
The designer complains with this error:
Could not open in Design View. Quote values differently inside a '<% ... "Value" ...%>' block.
The problem is in the onmouseover line.
Any ideas?
<tr valign="top"
id="<%# DataBinder.Eval(Container.
onmouseover="document.all(
</tr>
The designer complains with this error:
Could not open in Design View. Quote values differently inside a '<% ... "Value" ...%>' block.
The problem is in the onmouseover line.
Any ideas?
ASKER
I am getting a different error:
Could not open in Design View. Place quotes around a '<% %>' block used as an attribute value or within a <SELECT> element.
Could not open in Design View. Place quotes around a '<% %>' block used as an attribute value or within a <SELECT> element.
<tr valign="top"
id='<%# DataBinder.Eval(Container. DataItem, "idNatureComptable") %>'
onmouseover=document.all(' <%# DataBinder.Eval(Container. DataItem, "idNatureComptable") %>').style.background='d3d 3d3'
</tr>
try that
id='<%# DataBinder.Eval(Container.
onmouseover=document.all('
</tr>
try that
take that out
.style.background='d3d3d3' '
.style.background='d3d3d3'
ASKER
praneetha, on this particular line, removing the ' from the beginning and the end is working.
But what about this line:
<td valign="top"
style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px"
width="80"
style="cursor:hand;"
onclick="document.all('spd d').style. display='n one';docum ent.all('t xtVal').va lue='<%# DataBinder.Eval(Container. DataItem, "CompteGeneral") %>';document.all('spdd2'). style.disp lay='none' "><%# DataBinder.Eval(Container. DataItem, "CompteGeneral") %>
</td>
(The problem is on the onclick line)
But what about this line:
<td valign="top"
style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px"
width="80"
style="cursor:hand;"
onclick="document.all('spd
</td>
(The problem is on the onclick line)
onclick=document.all('spdd ').style.d isplay='no ne';docume nt.all('tx tVal').val ue='<%# DataBinder.Eval(Container. DataItem, "CompteGeneral") %>';document.all('spdd2'). style.disp lay='none' >
<%# DataBinder.Eval(Container. DataItem, "CompteGeneral") %>
try that
<%# DataBinder.Eval(Container.
try that
ASKER
I am about to let this problem and pass on other things!!! In fact, this question is not for me (it is for a friend)!
<itemtemplate>
<tr valign="top"
id='<%# DataBinder.Eval(Container. DataItem, "idNatureComptable") %>'
onmouseover=document.all(' <%# DataBinder.Eval(Container. DataItem, "idNatureComptable") %>').style.background='#d3 d3d3'
>
<!--onmouseover="document. all('<%# DataBinder.Eval(Container. DataItem, "idNatureComptable") %>').style.background='d3d 3d3'" -->
<!--onmouseout="document.a ll('<%# DataBinder.Eval(Container. DataItem, "idNatureComptable") %>').style.background='whi te'" -->
<!--
<td valign="top" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px"
width="80" style="cursor:hand;" onclick="document.all('spd d').style. display='n one';docum ent.all('t xtVal').va lue='<%# DataBinder.Eval(Container. DataItem, "CompteGeneral") %>';document.all('spdd2'). style.disp lay='none' "><%# DataBinder.Eval(Container. DataItem, "CompteGeneral") %></td>
<td valign="top" align=left style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px"
width="270" style="cursor:hand;" onclick="document.all('spd d').style. display='n one';docum ent.all('t xtVal').va lue='<%# DataBinder.Eval(Container. DataItem, "CompteGeneral") %>';document.all('spdd2'). style.disp lay='none' "><%# DataBinder.Eval(Container. DataItem, "Description") %></td>
-->
</tr>
</itemtemplate>
As you can see, most lines are commented out. As soon as I add the first onmouseover line, this result in the following error:
Could not open in Design View. Place quotes around a '<% %>' block used as an attribute value or within a <SELECT> element.
<itemtemplate>
<tr valign="top"
id='<%# DataBinder.Eval(Container.
onmouseover=document.all('
>
<!--onmouseover="document.
<!--onmouseout="document.a
<!--
<td valign="top" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px"
width="80" style="cursor:hand;" onclick="document.all('spd
<td valign="top" align=left style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px"
width="270" style="cursor:hand;" onclick="document.all('spd
-->
</tr>
</itemtemplate>
As you can see, most lines are commented out. As soon as I add the first onmouseover line, this result in the following error:
Could not open in Design View. Place quotes around a '<% %>' block used as an attribute value or within a <SELECT> element.
ASKER
AerosSaga, I tried to remove the .style.background='#d3d3d3 ' and I have the same problem.
<!--onmouseover="document. all('<%# DataBinder.Eval(Container. DataItem, "idNatureComptable") %>').style.background='d3d 3d3'" -->
<!--onmouseout="document.a ll('<%# DataBinder.Eval(Container. DataItem, "idNatureComptable") %>').style.background='whi te'" -->
for which tag r u adding mouseover ....it should be inbetween < >
<!--onmouseout="document.a
for which tag r u adding mouseover ....it should be inbetween < >
ASKER
praneetha, thank you for your patience.
Here is a cut-down version of my last post (removing all commented lines). Even with this I have the error.
<itemtemplate>
<tr valign="top"
id='<%# DataBinder.Eval(Container. DataItem, "idNatureComptable") %>'
onmouseover=document.all(' <%# DataBinder.Eval(Container. DataItem, "idNatureComptable") %>').style.background='#d3 d3d3'
>
</tr>
</itemtemplate>
>>for which tag r u adding mouseover ....it should be inbetween < >
I don't understand what you are asking. I think that everything that should be between <> are in!
Here is a cut-down version of my last post (removing all commented lines). Even with this I have the error.
<itemtemplate>
<tr valign="top"
id='<%# DataBinder.Eval(Container.
onmouseover=document.all('
>
</tr>
</itemtemplate>
>>for which tag r u adding mouseover ....it should be inbetween < >
I don't understand what you are asking. I think that everything that should be between <> are in!
<tr valign="top"
id='<%# DataBinder.Eval(Container. DataItem, "idNatureComptable") %>'
onmouseover="this.style.ba ckground=' #d3d3d3' ">
</tr>
try that
id='<%# DataBinder.Eval(Container.
onmouseover="this.style.ba
</tr>
try that
ASKER
For this line, "this" is working. But then I have a problem on the following lines (in TDs):
<itemtemplate>
<tr valign="top"
id='<%# DataBinder.Eval(Container. DataItem, "idNatureComptable") %>'
onmouseover=this.style.bac kground='# d3d3d3'
onmouseout=this.style.back ground='wh ite'" >
<td valign="top" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px"
width="80" style="cursor:hand;" onclick="document.all('spd d').style. display='n one';docum ent.all('t xtVal').va lue='<%# DataBinder.Eval(Container. DataItem, "CompteGeneral") %>';document.all('spdd2'). style.disp lay='none' "><%# DataBinder.Eval(Container. DataItem, "CompteGeneral") %>
</td>
<td valign="top" align=left style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px"
width="270" style="cursor:hand;" onclick="document.all('spd d').style. display='n one';docum ent.all('t xtVal').va lue='<%# DataBinder.Eval(Container. DataItem, "CompteGeneral") %>';document.all('spdd2'). style.disp lay='none' "><%# DataBinder.Eval(Container. DataItem, "Description") %>
</td>
</tr>
</itemtemplate>
<itemtemplate>
<tr valign="top"
id='<%# DataBinder.Eval(Container.
onmouseover=this.style.bac
onmouseout=this.style.back
<td valign="top" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px"
width="80" style="cursor:hand;" onclick="document.all('spd
</td>
<td valign="top" align=left style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px"
width="270" style="cursor:hand;" onclick="document.all('spd
</td>
</tr>
</itemtemplate>
emoreau,
i suggest you to tell your friend to not give this problem attention - it is a problem with VS.NET and the time spent in searching the problem are useless
Regards!
B..M
i suggest you to tell your friend to not give this problem attention - it is a problem with VS.NET and the time spent in searching the problem are useless
Regards!
B..M
ASKER
I cannot view this page in the designer! That's why we are looking for the solution.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
No solution came out!
One Solution is to use a package like dreamweaver to view the design view and Visual Studio to edit the code. Saves you changing the code.
ASKER
It doesn't really help. It is the imbrication of many single/double quotes combination that causes the error!
this is because a server code is stands in the quotes
try with this lines
<tr valign="top"
id='<%# DataBinder.Eval(Container.
onmouseover='document.all(
</tr>
Regards!
B..M