Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / July 2007

Tip: Looking for answers? Try searching our database.

Base page refrence

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Vikram - 10 Jul 2007 08:24 GMT
I have a web page which inherits from another page called Basepage.
In the Base page class I want to get reference of any gridview which is in
derived page. How to do that?

Thanks
Teemu Keiski - 10 Jul 2007 13:23 GMT
If you have fields defined for them on the base page, using
CodeFileBaseClass attribute helps.
http://aspadvice.com/blogs/joteke/archive/2006/03/08/15655.aspx

Otherwise, using FindControl etc of course works.

Signature

Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net

>I have a web page which inherits from another page called Basepage.
> In the Base page class I want to get reference of any gridview which is in
> derived page. How to do that?
>
> Thanks
Vikram - 10 Jul 2007 13:34 GMT
No I don not have fields defined on the base page. I did findcontrol but i
did not get any control.
Please let me know in more details.

> If you have fields defined for them on the base page, using
> CodeFileBaseClass attribute helps.
[quoted text clipped - 7 lines]
> >
> > Thanks
Teemu Keiski - 10 Jul 2007 14:01 GMT
Post some code to demonstrate. Using FindControl should work, but of course
you must have protective logic in case separate subpages have different
kinds of controls you all query for.

Teemu

> No I don not have fields defined on the base page. I did findcontrol but i
> did not get any control.
[quoted text clipped - 12 lines]
>> >
>> > Thanks

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.