Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.1
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 30th, 2004, 06:55 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 245
Thanks: 0
Thanked 0 Times in 0 Posts
Default DataList and <A href> link Problem

Hello
I tried to use:
<asp:DataList id="RoleList" runat="server">
<ItemTemplate>
<a href="EditRole.aspx?RoleID=<%# DataBinder.Eval(Container.DataItem, "RoleID") %>"><%# DataBinder.Eval(Container.DataItem, "Description") %></a><br/>
</ItemTemplate>
</asp:DataList>

The code runs but I can't view this in DESIGN VIEW. I get error:
"Could Not open in Design View. Quote value differently inside a'<%..."value"...%>'block"

I got this code from Wrox book it works but why can't I open Design View. Can someone correct this code so I can see it in Design View.

Thanks you.

 
Old September 30th, 2004, 07:22 AM
Authorized User
 
Join Date: Jul 2004
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default

try a single quote for href= like this
<asp:DataList id="RoleList" runat="server">
<ItemTemplate>
<a href='EditRole.aspx?RoleID=<%# DataBinder.Eval(Container.DataItem, "RoleID") %>'><%# DataBinder.Eval(Container.DataItem, "Description") %></a><br/>
</ItemTemplate>
</asp:DataList>


 
Old September 30th, 2004, 06:25 PM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 245
Thanks: 0
Thanked 0 Times in 0 Posts
Default

cfouquet
I tried with single quote but now I get "Error Creating Control" for Datalist.


 
Old September 30th, 2004, 08:57 PM
Authorized User
 
Join Date: Jul 2004
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default

works on my machine. Please post the code for the form. We'll see if we can find somehting wrong

 
Old October 1st, 2004, 05:25 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 245
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello cfouquet, here is the full code:
DataList and <A href> link Problem


<table class="bortbl" cellPadding="10" width="364" align="center">
<TBODY>
<tr>
<td class="Brown8" vAlign="top" width="100%"><br>
<asp:label id="lblA" runat="server" Height="8px">
<div class="h">[Role Configuration]</div>
</asp:label><br>
<br>
The following is a list of roles configured for use with your system:<br>
<br>
<p><asp:DataList id="RoleList" runat="server" Height="64px" Width="280px">
<a href="EditRole.aspx?RoleID=<%# DataBinder.Eval(Container.DataItem, "RoleID") %>"><%# DataBinder.Eval(Container.DataItem, "Description") %></a><br />
</ItemTemplate>
</asp:DataList></p>
Create new Role:<br>
<asp:textbox id="NewRoleDescription" runat="server"></asp:textbox><br>
<asp:button id="NewRoleButton" runat="server" Text="Create Role" CssClass="AliceBbut"></asp:button></td></tr>
</TBODY></table>


Don't know why single quote gives me "Error Creating Control" and when I use double quote I can't view this in DESIGN VIEW. Thanks






Similar Threads
Thread Thread Starter Forum Replies Last Post
setting combox box value to href in <link> bhairraju CSS Cascading Style Sheets 2 March 23rd, 2007 01:58 PM
Including XSL in an <a href> graywoodhouse XSLT 2 November 12th, 2004 06:08 AM
DataList <a Href> Question in Roles.aspx bekim BOOK: ASP.NET Website Programming Problem-Design-Solution 5 October 5th, 2004 02:54 PM
<href> causing problems mahulda ASP.NET 1.0 and 1.1 Basics 5 July 15th, 2004 12:15 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.