Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Professional
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional 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 Search this Thread Display Modes
  #1 (permalink)  
Old October 24th, 2006, 01:27 PM
Authorized User
 
Join Date: Jun 2005
Location: , , .
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default cannot view the design of the .aspx page

I have a datagrid column which goes as -

<asp:TemplateColumn HeaderText="New Inquiry Type">
    <ItemTemplate>
        <asp:Hyperlink ID="hplnkInquiryType" Runat="Server" text=<%#DataBinder.Eval(Container.DataItem,"invest or name").ToString()%>>
        </asp:Hyperlink>
    </ItemTemplate>
</asp:TemplateColumn>

when i try to view the page in the design mode i get this error --

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

it works when i wrap the text attribute within 2 single quotes -
<asp:TemplateColumn HeaderText="New Inquiry Type">
    <ItemTemplate>
        <asp:Hyperlink ID="hplnkInquiryType" Runat="Server" text='<%#DataBinder.Eval(Container.DataItem,"inves tor name").ToString()%>>'
        </asp:Hyperlink>
    </ItemTemplate>
</asp:TemplateColumn>

but then the Hyperlink on the datagrid throws an error when clicked as - <some investor name> undefined
i.e. coz it needs the investor_name to be wrapped around single quotes.
thus the hyperlink works with the following code but no design view --
<asp:TemplateColumn HeaderText="New Inquiry Type">
    <ItemTemplate>
        <asp:Hyperlink ID="hplnkInquiryType" Runat="Server" text="'" + <%#DataBinder.Eval(Container.DataItem,"investor name").ToString() + "'" %>>
        </asp:Hyperlink>
    </ItemTemplate>
</asp:TemplateColumn>

  #2 (permalink)  
Old October 24th, 2006, 01:31 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Try this:

<asp:Hyperlink ID="hplnkInquiryType" Runat="Server" text='<%# Container.DataItem("Investor Name")%>' />

-------------------------
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.

^^Thats my signature
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
View source of .aspx page not being displayed nitinp ASP.NET 2.0 Basics 5 November 7th, 2006 06:55 AM
Blank Design View ??? smuger Dreamweaver (all versions) 4 October 11th, 2004 04:40 PM
how to enable the design view yylee Access VBA 2 October 4th, 2004 02:23 PM
Displaying roles.aspx in design view nigelhamilton BOOK: ASP.NET Website Programming Problem-Design-Solution 6 September 3rd, 2004 09:23 AM
Could not open in design view!! texasraven ASP.NET 1.x and 2.0 Application Design 4 March 17th, 2004 03:22 PM



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


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