Problem with Could not open in Design view.

  • Thread starter Maziar Aflatoun
  • Start date
M

Maziar Aflatoun

Hi everyone,

I'm using Visual Studio .NET to create a shopping cart. As soon as I add
the following line in my code

<td width="25%" align="center" bgcolor="#ffffff">
<input type="button" id="Add" name="Add" Class="button1" value="Add to
Cart" onclick="JavaScript:location.replace('ShoppingCart.aspx?ProductID=<%#
DataBinder.Eval (Container.DataItem, "ProductID") %>)';">
</td>

I get the following error message when I try to switch to 'Design' view.

Could not open in Design view. Quote values differently inside a
'<%..."value"...%> block.

Any idea how I can fix this?

Thank you
Maziar Aflatoun
 
J

John Saunders

Maziar Aflatoun said:
Hi everyone,

I'm using Visual Studio .NET to create a shopping cart. As soon as I add
the following line in my code

<td width="25%" align="center" bgcolor="#ffffff">
<input type="button" id="Add" name="Add" Class="button1" value="Add to
Cart" onclick="JavaScript:location.replace('ShoppingCart.aspx?ProductID=<%#
DataBinder.Eval (Container.DataItem, "ProductID") %>)';">
</td>

I get the following error message when I try to switch to 'Design' view.

Could not open in Design view. Quote values differently inside a
'<%..."value"...%> block.

Any idea how I can fix this?

You mean, other than doing what the error message says to do? :)

It's complaining about the double-quotes around ProductID.
 

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,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top