Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > Other ASP.NET > ASP.NET 1.x and 2.0 Application Design
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.x and 2.0 Application Design Application design with ASP.NET 1.0, 1.1, and 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.x and 2.0 Application Design section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old August 26th, 2003, 10:08 AM
Authorized User
 
Join Date: Aug 2003
Location: , , .
Posts: 45
Thanks: 0
Thanked 0 Times in 0 Posts
Default Could not open in design view!!

I had my project working last night. When I tried to open it this morning, it wouldn't show me design for one of the pages. Complains something like this:

Could not open in design view. Place quotes around a '<% %>' block used as an attribute value or within a <SELECT> element

Here is my HTML and script page:

<%@Register tagprefix="FSA" TagName="NavigationBar2" src="NavigationBar2.ascx" %>
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="frmLMCAssignments.aspx.vb" Inherits="FSA_1._1.frmLMCAssignments" debug="true"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
.
.
<body
<form
<table
<tr
<td
<asp:datagrid
<columns>
<asp:TemplateColumn HeaderText = "Assigned">
<ItemTemplate>
    <asp:CheckBox ID = "cbAssigned" Runat = "server"
        Checked = <%#DataBinder.Eval(Container.DataItem,"IsAssigned" )%>
    Enabled = False />
    </ItemTemplate>
    </asp:TemplateColumn>
/td>
/tr>
/table>
/form>
/body>


These are the only places where I'm using '<% %>' blocks.

Will appreciate any help.



.
</HTML>
  #2 (permalink)  
Old August 26th, 2003, 10:13 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , Denmark.
Posts: 184
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Jonax
Default

Do you have a <SELECT> element...?


  #3 (permalink)  
Old August 26th, 2003, 10:25 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Try this...
Code:
<asp:CheckBox ID = "cbAssigned" Runat = "server"
        Checked="<%#DataBinder.Eval(Container.DataItem,"IsAssigned")%>"
        Enabled="False" />
        I would advise to always put attributes in quotes.

Note regarding this: I think that when you do something like put a Databinder result in a web control attribute value you have to put it in single quotes...
Code:
<asp:CheckBox ID = "cbAssigned" Runat = "server"
        Checked='<%#DataBinder.Eval(Container.DataItem,"IsAssigned")%>'
        Enabled="False" />
        Kind of weird but that is what seems to work.
  #4 (permalink)  
Old August 26th, 2003, 03:47 PM
Authorized User
 
Join Date: Aug 2003
Location: , , .
Posts: 45
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks planoie, you hit it on the dot.

  #5 (permalink)  
Old March 17th, 2004, 03:22 PM
Registered User
 
Join Date: Mar 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes, this allows you to see your page in design view, but the resulting HTML checked='true' or checked='false' (with single quotes) does not do what you'd expect in a browser: For example, in my IE 6.0, if all radio buttons are checked='false' the very last one will appear checked. :) IE expects there to be the word checked (without quotations) or not... I don't know how to solve this issue: you can't seem to be able to open the aspx page in design view and have it behave correctly in browser too :).

 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Report change in Design View echovue Access VBA 4 March 3rd, 2006 04:31 PM
Blank Design View ??? smuger Dreamweaver (all versions) 4 October 11th, 2004 05:40 PM
how to enable the design view yylee Access VBA 2 October 4th, 2004 03:23 PM
Question about form's design view reindeerw Access 15 April 13th, 2004 12:33 AM



All times are GMT -4. The time now is 02:45 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.