Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Basics
|
ASP.NET 3.5 Basics If you are new to ASP or ASP.NET programming with version 3.5, this is the forum to begin asking questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Basics 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 13th, 2008, 09:51 AM
Registered User
 
Join Date: Sep 2008
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 4: Using the Panel Control

Currently doing this exercise and for some strange reason it isn't working! Not sure what I'm doing wrong.

I'v followed through the tutorial to the letter (apart from giving the CheckBox a meaningful name because I cannot find the Text property)

But when I try to enter the following code:

Panel1.Visible = CheckBoxList1.Checked

It doesen't recognise the 'Checked' part of it and gives the following error message when trying to run.

Error 1 'Checked' is not a member of 'System.Web.UI.WebControls.CheckBoxList'. I:\ASP\PlanetWrox\Demos\Containers.aspx.vb 7 26 I:\ASP\PlanetWrox

If anyone could help it would be much appreciated.

 
Old September 13th, 2008, 02:32 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Steve,

You dragged the wrong control from the Toolbox. You shouldn't use a CheckBoxList but a CheckBox instead. Then this code works fine:

Panel1.Visible = CheckBox<s>List</s>1.Checked

You'll also see that the control then has a Text property.

For future posts related to the book, can you please post the in the book's own forum here at P2P: http://p2p.wrox.com/forum.asp?FORUM_ID=386 Makes it easier for me (and others) to keep track of book related posts; I almost overlooked this one.

Cheers,

Imar

---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.
 
Old September 14th, 2008, 12:30 PM
Registered User
 
Join Date: Sep 2008
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

No problem at all Imar (I feel honoured you replied!).

Just trying to crack the ListBox and then I'll get back onto this. (Need to prove to my employees that i can do this...already done it in Access many years ago but want to take my skills on a step further now)

 
Old September 14th, 2008, 01:55 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Feel free to post follow up questions with regards to the cascading drop down list. It's probably best to create a separate thread for it in the general Beginning ASP.NET forum.

Cheers,

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding a Panel control in FormView steve35719 ASP.NET 2.0 Basics 5 August 18th, 2010 12:32 AM
Control panel maz_alaameri ASP.NET 2.0 Professional 0 March 17th, 2008 06:59 AM
Update Panel & Button Control Harjinder ASP.NET 2.0 Professional 0 January 28th, 2008 06:13 AM
One Record at a time Or Panel Control Paging guywonderer Classic ASP Basics 0 August 7th, 2005 05:22 PM
lock control panel anyone VB How-To 4 February 1st, 2005 08:59 PM





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