p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8
This is the forum to discuss the Wrox book Beginning ASP.NET 2.0 by Chris Hart, John Kauffman, David Sussman, Chris Ullman; ISBN: 9780764588501

Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 14th, 2009, 12:28 AM
Authorized User
Points: 60, Level: 1
Points: 60, Level: 1 Points: 60, Level: 1 Points: 60, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2008
Posts: 13
Thanks: 1
Thanked 0 Times in 0 Posts
Default Chapter11

Hi,
All, have anyone complited the Chapter 11 TIO(Using profile In WroxUnited)?Because while
running the WroxUnited website of the chapter11 folder I am getting NULL reference exception.
The exception is thrown from the file fanclub.aspx.cs and.The exception is shown for the following line
((TextBox)FCLoginView.FindControl("txtName")).Text = Profile.Name;
The code is as follows:
private void DisplayProfileProperties()
{
TextBox NameBox = (TextBox)FCLoginView.FindControl("txtName");


if (NameBox != null )
{
((TextBox)FCLoginView.FindControl("txtName")).Text = Profile.Name;
((TextBox)FCLoginView.FindControl("txtAddress")).T ext = Profile.Address;
((TextBox)FCLoginView.FindControl("txtCity")).Text = Profile.City;
((TextBox)FCLoginView.FindControl("txtCounty")).Te xt = Profile.County;
((TextBox)FCLoginView.FindControl("txtPostCode")). Text = Profile.PostCode;
((TextBox)FCLoginView.FindControl("txtCountry")).T ext = Profile.Country;
((CheckBox)FCLoginView.FindControl("chkMailing")). Checked = Profile.Mailings;
((TextBox)FCLoginView.FindControl("txtEmail")).Tex t = Profile.Email;
((TextBox)FCLoginView.FindControl("txtAlias")).Tex t = Profile.MemberName;
}

}


So again I am seeking help regarding this problem..
Thanx in advance.
Regards,
Subhasis
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old January 18th, 2009, 04:36 PM
Authorized User
Points: 140, Level: 2
Points: 140, Level: 2 Points: 140, Level: 2 Points: 140, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2008
Location: , , Greece.
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to fh84
Default

this the code i have for chapter 11. it works except the drop down menu.

using System;
using System.Web;
using System.Web.UI.WebControls;

partial class FanClub : System.Web.UI.Page
{
private void Page_Load(object sender, System.EventArgs e)
{
if (!Page.IsPostBack)
DisplayProfileProperties();
}
protected void btnCancelChanges_Click(object sender, System.EventArgs e)
{
DisplayProfileProperties();
}
protected void btnSaveChanges_Click(object sender, System.EventArgs e)
{
Profile.Theme = ((DropDownList)FCLoginview.FindControl("ThemeList" )).SelectedValue;
Profile.Name = ((TextBox)FCLoginview.FindControl("txtName")).Text ;
Profile.Address = ((TextBox)FCLoginview.FindControl("txtAddress")).T ext;
Profile.City = ((TextBox)FCLoginview.FindControl("txtCity")).Text ;
Profile.County = ((TextBox)FCLoginview.FindControl("txtCounty")).Te xt;
Profile.PostCode = ((TextBox)FCLoginview.FindControl("txtPostCode")). Text;
Profile.Country = ((TextBox)FCLoginview.FindControl("txtCountry")).T ext;
Profile.Mailings = ((CheckBox)FCLoginview.FindControl("chkMailing")). Checked;
Profile.Email = ((TextBox)FCLoginview.FindControl("txtEmail")).Tex t;
Profile.MemberName = ((TextBox)FCLoginview.FindControl("txtAlias")).Tex t;
Server.Transfer(SiteMap.CurrentNode.Url);
}
protected void FCLoginview_ViewChanged(object sender, System.EventArgs e)
{
DisplayProfileProperties();
}
private void DisplayProfileProperties()
{
TextBox NameBox = (TextBox)FCLoginview.FindControl("txtName");
if (NameBox != null)
{
((DropDownList)FCLoginview.FindControl("ThemeList" )).SelectedValue = Profile.Theme;
((TextBox)FCLoginview.FindControl("txtName")).Text = Profile.Name;
((TextBox)FCLoginview.FindControl("txtAddress")).T ext = Profile.Address;
((TextBox)FCLoginview.FindControl("txtCity")).Text = Profile.City;
((TextBox)FCLoginview.FindControl("txtCounty")).Te xt = Profile.County;
((TextBox)FCLoginview.FindControl("txtPostCode")). Text = Profile.PostCode;
((TextBox)FCLoginview.FindControl("txtCountry")).T ext = Profile.Country;
((CheckBox)FCLoginview.FindControl("chkMailing")). Checked = Profile.Mailings;
((TextBox)FCLoginview.FindControl("txtEmail")).Tex t = Profile.Email;
((TextBox)FCLoginview.FindControl("txtAlias")).Tex t = Profile.MemberName;
}
}

}


by the way, when you pick any value from the drop down menu, does it change the backgroud?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter11 Anybody Get This Far????? MisterH BOOK: Wrox's Visual Basic 2005 Express Edition Starter Kit ISBN: 978-0-7645-9573-8 0 April 11th, 2008 07:36 AM
Chapter11 page 400 asplundo BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 0 February 18th, 2008 09:29 AM
error in chapter11 postcard.php GOUR CHANDRA PAUL BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 0 December 7th, 2005 07:30 PM
chapter11 Doll BOOK: Beginning Visual C# 2 June 12th, 2004 11:41 PM
chapter11 login webshark BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 16 March 23rd, 2004 06:42 PM



All times are GMT -4. The time now is 09:39 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc