|
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
| This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593 |
|
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 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
|
|
|
|
March 14th, 2011, 02:40 PM
|
Authorized User
|
|
Join Date: Aug 2010
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Chapter 13,page 440.
Hi
I'm having a problem with renaming the bulleted control in my project.Using the step by step instructions it gives an error message:Invalid identifier.How do you suggest a way to work around this problem,so the results come out exactly shown on page 441.
|
March 15th, 2011, 03:56 AM
|
|
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi there,
Make sure the ID of the control starts with an l from list, and not with a 1 from first. E.g. it should be called
and not
Hope this helps,
Imar
|
March 16th, 2011, 02:50 PM
|
Authorized User
|
|
Join Date: Aug 2010
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Chapter 13,page 440
I did what you suggested an after running it,it gave me this:DataBinding: '<>f__AnonymousType0`2[[System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.Data.Linq.EntitySet`1[[Cell_Makes_2, App_Code.1rk23bjr, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]], System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]' does not contain a property with the name 'CellMakes2'.("CellMakes2 being the name of my database in my project").What could be the problem?
|
March 16th, 2011, 03:23 PM
|
|
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Can you post your code for the control? Looks like you're trying to bind to a non-existing column.
Also, are you building Planet Wrox or your own site?
Imar
|
March 16th, 2011, 03:38 PM
|
Authorized User
|
|
Join Date: Aug 2010
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Chapter 13,page 440
Will do.here it is:public partial class AllPhones_By_Kind : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
using (Cell_WareDataContext myDataContext = new Cell_WareDataContext())
{
var allTypesOfPhones = from typesofphones in myDataContext.TypesOfPhones
orderby typesofphones.Name
select new { typesofphones.Name, typesofphones.Cell_Makes_2s };
Repeater1.DataSource = allTypesOfPhones;
Repeater1.DataBind();
}
}
}
<asp:BulletedList ID="lstCellMakes2" runat="server" DataSource='<%# Eval ("CellMakes2") %>' DataTextField="Title">
</asp:BulletedList>.
I'm building my own web-site,using the planet-wrox book as a guide.
|
March 16th, 2011, 04:05 PM
|
|
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi there,
Take a look at this:
Code:
select new { typesofphones.Name, typesofphones.Cell_Makes_2s };
and this:
Code:
<asp:BulletedList ID="lstCellMakes2" runat="server" DataSource='<%# Eval ("CellMakes2") %>' DataTextField="Title">
You're projecting (selecting) Cell_Makes_2s, but you're binding to CellMakes2.
You need to update the control to match the properties you're selecting.
Hope this helps,
Imar
|
March 17th, 2011, 10:45 AM
|
Authorized User
|
|
Join Date: Aug 2010
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Chapter 13,page 440
It really helped alot Much appreciated.
|
Similar Threads
|
Thread |
Thread Starter |
Forum |
Replies |
Last Post |
Chapter 13, Page 465 Try it Out |
dstreeter |
BOOK: Beginning ASP.NET 4 : in C# and VB |
3 |
November 7th, 2010 10:41 AM |
page 456, chapter 13. |
leemark2k3 |
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 |
8 |
September 21st, 2010 08:21 PM |
Chapter 13 page 444 |
DRAYKKO |
Beginning VB 6 |
1 |
April 19th, 2006 07:10 PM |
|
|