Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics 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
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 25th, 2005, 02:53 PM
Registered User
 
Join Date: May 2005
Location: woods cross, utah, USA.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default referencing controls in templates in form_view

I am having problems referencing controls and their properities the various templates in form_view. I need to set the visible property to false on a button in the item_template. I looked in the HELP section and there was a reference hyperlink called "Web Forms Control Identification" but the link is invalid. I have tried to do the following in the page_load subroutine.

dim var_deletebutton as new button
var_deletebutton = CType(me.formview1.findcontrol("bt_Delete"), button)
var_deletebutton.visible = false

I get this error when the program executes the second line of code:
"There is no source code available for the current location".

Can anyone help me?

thanks

dave potter[:

Reply With Quote
  #2 (permalink)  
Old May 25th, 2005, 03:09 PM
Registered User
 
Join Date: Apr 2005
Location: , FL, .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to MorningZ
Default

What's the reasoning for the "New" in the declaration line?

You aren't creating a button, only referencing an existing one.... so there is no "New" to:

Dim var_deletebutton As button

I'm not 100% sure if that's related to your current problem, but it might be


====================
Why do we drive on a parkway and park on a driveway?
Reply With Quote
  #3 (permalink)  
Old May 25th, 2005, 03:13 PM
Registered User
 
Join Date: May 2005
Location: woods cross, utah, USA.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I got rid of the "NEW" but still have the same error.

any other thoughts?

Reply With Quote
  #4 (permalink)  
Old May 25th, 2005, 04:23 PM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Quote:
quote:any other thoughts?
Yes, please don't cross post. I just spent some time answering this in another forum. Posting in multiple forums doesn't make things easier to track.....

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
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

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
Validation controls and FormView templates bpdsmark BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 1 September 28th, 2006 08:56 AM
CreateUserWizard -access controls inside templates vs .NET Framework 2.0 0 September 13th, 2006 09:01 PM
dynamic controls - referencing keyops VB.NET 0 February 14th, 2006 03:50 PM
Referencing Html Controls ~Bean~ ASP.NET 1.0 and 1.1 Basics 3 September 30th, 2005 09:11 AM



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


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