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 Professional
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 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 Professional 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 April 28th, 2006, 03:52 PM
Registered User
Join Date: Apr 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Trying to find control on content page

Hello. I am trying to access a hidden field that is on a content page, from my custom class being called from my objectdatasource.

Lets see if I can make this more clear:

I have a class named ItemsDAL that has a method called GetRecords.

I have a master/content page that has an ObjectDataSource with Type=ItemsDAL and it's selectMethod=GetRecords.
Also on this master/content page is my GridView and a HiddenField with an ID=MyHiddenField

In the ItemsDAL.GetRecords I'd like to access the value in that hidden field.

I've made the class inherit system.web.ui.page and have tried every combination of Page.FindControl I can think of.

I'm thinking that instead of inheriting system.web.ui.page I need to inherit the page class itself...am I on the right track?


  #2 (permalink)  
Old April 28th, 2006, 06:20 PM
Registered User
Join Date: Apr 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

I've discovered that it's due to the fact that APP_CODE gets compiled into it's own assembly first...and thusly items in APP_CODE can be referenced by a page, but not vice versa. I've seen mention that one could build a base class that your pages/master pages derive from, and then you could do this....but I haven't seen an example I can follow yet lol.

Does anyone have a simple VB example of how to build an interface to a masterpage, in the manner I've described?



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
Master Page Method: Code-Behind for Content Page kwilliams ASP.NET 2.0 Professional 3 June 2nd, 2008 12:57 PM
Master Page and Content Page with Java script Harjinder ASP.NET 2.0 Professional 1 February 1st, 2008 10:31 AM
master page and content page interaction mrjoka ASP.NET 2.0 Basics 0 March 15th, 2007 10:45 AM
Access Master page control from Content page. angshujit ASP.NET 2.0 Basics 3 January 11th, 2007 06:20 AM
content page viewstate value in Master Page cbe_seenu ASP.NET 2.0 Professional 0 August 1st, 2006 01:01 AM

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

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