Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > ASP.NET 4 General Discussion
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 4 General Discussion For ASP.NET 4 discussions not relating to a specific Wrox book
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 4 General Discussion 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 August 4th, 2010, 05:20 AM
Registered User
Join Date: Aug 2010
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Panel Control on FormView ASP.NET 4 Webforms

I tried to enclose part of a Formview in a Panel but it does not work.

First, I tried "spanning the tags" over the desired fields in Markup/Source, but there was an error message about Panel unable to span templates (never mind that it was just the InsertItem Template alone in use).

Then, I went to edit templates => InsertItems, and there, drew a box around the desired fields. It seemed to take, but when I inserted a Checkbox to control the Panel, and went to write the code, "Panel1" could not be found by intellisense, so I could not successfully complete the process.

Question: Can Panel Control live on Formview configured to hide just part of the form? If so, how?

Thanks in advance.
Reply With Quote
  #2 (permalink)  
Old August 4th, 2010, 01:09 PM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts

You can't access the control in the FormView directly; you need to use FindControl on the relevant template.

Google for FindControl FormView and you'll find some useful articles.


Imar Spaanjaars
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote

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
Adding a Panel control in FormView steve35719 ASP.NET 2.0 Basics 5 August 18th, 2010 12:32 AM
ASP.NET and C# Webforms rtomanio ASP.NET 2.0 Basics 2 September 2nd, 2008 08:58 PM
Making a Panel visible in a FormView steve35719 VB How-To 0 June 29th, 2006 07:49 AM
Default Buttons - in ASP.NET webforms brameshkannan Classic ASP Professional 2 August 2nd, 2004 03:32 AM
panel in asp.net alyeng2000 ASP.NET 1.x and 2.0 Application Design 3 December 13th, 2003 01:06 PM

All times are GMT -4. The time now is 04:15 PM.

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