"Could not open in Design view. Quote values differently..." solved!

My blog has moved.
You can view this post at the following address:
http://www.osherove.com/blog/2003/8/28/quotcould-not-open-in-design-view-quote-values-differentlyqu.html
Published Thursday, August 28, 2003 8:20 AM by RoyOsherove

Comments

Thursday, August 28, 2003 5:16 AM by Frans Bouma

# re: "Could not open in Design view. Quote values differently..." solved!

It's still one of the crappy bugs in the ASP.NET editor IMHO. Also when you include databinding statements in the strings of a html tag, it can't show the designer. MS should have solved this years ago.
Thursday, August 28, 2003 5:19 AM by Roy Osherove

# re: "Could not open in Design view. Quote values differently..." solved!

Yep. It does suck :)
Monday, September 15, 2003 3:31 PM by Raj

# re: "Could not open in Design view. Quote values differently..." solved!

Thanks Guys , the above change from " to ' on an image tag helped me get back to the design view.

Thanks again,

Raj
Tuesday, January 06, 2004 2:11 PM by erik

# re: "Could not open in Design view. Quote values differently..." solved!

cool ! I was having this problem too, thank you guys for posting the answer !!




Erik
Sunday, January 11, 2004 4:05 PM by Andy Foster

# re: "Could not open in Design view. Quote values differently..." solved!


Hi,

Yes, this is a weak bit of the IDE..

In the above example, it may be better to use an image server control and set the Image URL in the page_load event. Only really works if the URL is static, won't work if an application setting is used to populate the ImageURL.

Tuesday, January 13, 2004 2:05 AM by sekhar

# re: "Could not open in Design view. Quote values differently..."

hi,
Any one send me the solution
veera.sekhar@inucom.com
Tuesday, January 13, 2004 2:17 AM by sekhar

# re: "Could not open in Design view. Quote values differently..."


Hi


<asp:TemplateColumn>
<ItemTemplate>
<a href="javascript:edit('<%# DataBinder.Eval(Container.DataItem,"sdone")%>')">
<asp:Image ID="im1" Runat="server" ImageUrl="images/Edit.gif"></asp:Image>
</a>
</ItemTemplate>
</asp:TemplateColumn>


I am not viewing the designing when i was useing this Evaluation expression..

Any one send me the solution...

veera.sekhar@inucom.com
Tuesday, January 13, 2004 2:21 AM by Roy Osherove

# re: "Could not open in Design view. Quote values differently..." solved!

Sekhar, it must be some other piece of code, I can't see anything wrong with it. And Please, don't flood the comments section, will ya?
I would also advise you to try out the various newsgroups out there.
Sunday, February 01, 2004 4:57 AM by Anders V.

# re: "Could not open in Design view. Quote values differently..." solved!

Thanks for this small but important information. Im finally able to get into my design view, though still using Dreamweaver to design.

Best,
Anders
Wednesday, February 25, 2004 12:35 PM by Syl

# re: "Could not open in Design view. Quote values differently..." solved!

I have the same problem of shekar:

<body onload='javascript: footerFocus('<% = viewState.Item("footerFocus") %>')'>

or

<body onload="javascript: footerFocus('<% = viewState.Item("footerFocus") %>')">

doesn't allow me to show the design mode...

If someone have a solution...
Saturday, February 28, 2004 8:52 PM by wally

# re: "Could not open in Design view. Quote values differently..." solved!

Just get rid of quotes eclosing javascript, like this

<body onload=javascript: footerFocus('<% = viewState.Item("footerFocus") %>')>
Saturday, February 28, 2004 8:55 PM by wally

# re: "Could not open in Design view. Quote values differently..." solved!

A little addition. Also get rid of all the spaces.
Monday, March 15, 2004 8:06 AM by ashish

# re: "Could not open in Design view. Quote values differently..." solved!

but what is the solution
Friday, April 02, 2004 9:15 AM by paulo costa

# re: "Could not open in Design view. Quote values differently..." solved!

i people thanks!!!!!! it's so stupid and i lost so time..lol
Wednesday, April 07, 2004 4:18 AM by Andy Evans

# re: "Could not open in Design view. Quote values differently..." solved!

Thanks guys! the single quote thing has just made my day :)
Thursday, April 22, 2004 3:46 PM by Eric Garza

# re: "Could not open in Design view. Quote values differently..." solved!

You can also use Response.Write to output whatever is needed (you might need to double the quotes in some cases).

<%
Response.Write("<body onload='javascript: footerFocus('" & viewState.Item("footerFocus") & "')'>")
%>
Tuesday, April 27, 2004 5:11 AM by El Rápido

# re: "Could not open in Design view. Quote values differently..." solved!

Still weird that I had to replace " with ' while the code example came from the web....makes you wonder how the creator managed it....oh well, problem solved....
Saturday, May 08, 2004 12:40 PM by Sonu Kapoor

# re: "Could not open in Design view. Quote values differently..." solved!

Great Tip, thanks Roy!

Sonu
Saturday, May 08, 2004 1:32 PM by Hubert Licman

# re: "Could not open in Design view. Quote values differently..." solved!

Thank you very much for the tip. It help me - the visual design is really better for imagé about a page layout... :-) Thank you!

Hubis
Monday, May 17, 2004 1:05 PM by John C

# re: "Could not open in Design view. Quote values differently..." solved!

How do you fix it for something like

<asp:TemplateColumn HeaderText="Company" SortExpression="companyName">
<ItemTemplate>
<asp:Label runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.companyName") %>'>
</asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:Label runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.companyName") %>' ID="Label3">
</asp:Label>
</EditItemTemplate>
</asp:TemplateColumn>
If you remove the single quotes and you get a different error message that tells you to put the item in single quotes.
Friday, June 04, 2004 6:46 AM by Venkat

# re: "Could not open in Design view. Quote values differently..." solved!

Thanks for posting this. It helped me on time.
Wednesday, June 16, 2004 10:09 AM by Troels Aaberg Sørensen

# re: "Could not open in Design view. Quote values differently..." solved!

Yet another "thank you".
This solved my problem like a charm.