Skip to content


Could not open in Design view. Quote values differently inside a ‘’ block.

The error message forced me to use macromedia dreamweaver instead of Visual Studio 2003 until today. I finally solved the issue and design View works fine with repeater web control.

The error occurs when swiching to design mode from HTML mode in visual studio 2003 assuming repeater web control is used. Especially href has javascript syntax and ** is passed as javascript argument.

Not worked:

<a href='javascript:viewDetail("<%# DataBinder.Eval
(Container.DataItem, "Country") %>")' class="gridCountryLinkB">

Worked:

<a href='<%# Databinder.Eval(Container.DataItem, "Country",
"javascript:viewDetail(""{0}"")") %>' class="gridCountryLinkB">

The third argument of Databinder.Eval is String formatter, which I think it was meant to be used for that case.

Also note that single quote must be used before .

Posted in Backend Tech.

One Response

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. shaymaa said

    i would like to use something like this
    ‘>
    but how can i concatenate the path of the image which is stored in application variable not in the database