473,395 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Base page refrence

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
Jul 10 '07 #1
3 1413
If you have fields defined for them on the base page, using
CodeFileBaseClass attribute helps.
http://aspadvice.com/blogs/joteke/ar.../08/15655.aspx

Otherwise, using FindControl etc of course works.

--
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net
"Vikram" <Vi****@discussions.microsoft.comwrote in message
news:1F**********************************@microsof t.com...
>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

Jul 10 '07 #2
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.

"Teemu Keiski" wrote:
If you have fields defined for them on the base page, using
CodeFileBaseClass attribute helps.
http://aspadvice.com/blogs/joteke/ar.../08/15655.aspx

Otherwise, using FindControl etc of course works.

--
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net
"Vikram" <Vi****@discussions.microsoft.comwrote in message
news:1F**********************************@microsof t.com...
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


Jul 10 '07 #3
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

"Vikram" <Vi****@discussions.microsoft.comwrote in message
news:9E**********************************@microsof t.com...
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.

"Teemu Keiski" wrote:
>If you have fields defined for them on the base page, using
CodeFileBaseClass attribute helps.
http://aspadvice.com/blogs/joteke/ar.../08/15655.aspx

Otherwise, using FindControl etc of course works.

--
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net
"Vikram" <Vi****@discussions.microsoft.comwrote in message
news:1F**********************************@microso ft.com...
>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



Jul 10 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
by: Marcin Vorbrodt | last post by:
Taken out of C++ In a Nutshell book... Example 7-18: Using an abstract classes as interface specification. struct Runnable { virtual void run() = 0; }; struct Hashable { virtual size_t...
1
by: Rhett | last post by:
Hello,EveryBody! I'm troubled by a design problem, Hoping that you'll save me out! The Situation is: We have two project of code A and B.A is our reusable code base, B is for specified for...
13
by: z. f. | last post by:
Hi, i have a class that is derived from System.Web.UI.Page, and this is the class i use in my application as PageBase. all other page classes are deriverd from my PageBase instead of the...
4
by: John | last post by:
Hi all, Is it possible for a usercontrol to call a public method of a page it is contained within? If so, how? Regards John.
5
by: Andy | last post by:
Hi all, I have a site with the following architecture: Common.Web.dll - Contains a CommonPageBase class which inherits System.Web.UI.Page myadd.dll - Contains PageBase which inherits...
161
by: KraftDiner | last post by:
I was under the assumption that everything in python was a refrence... so if I code this: lst = for i in lst: if i==2: i = 4 print lst I though the contents of lst would be modified.....
0
by: Gary | last post by:
I'm using VB.net in Visual Studio .net 2005. I've created a web service and have it hosted on a private server (Windows 2003 - IIS 6.0). I can add the web service as a Web Refrrence, but it...
2
by: Wade | last post by:
Hi all, We have created some "Base" class pages for our WebForms and UserControls. For instance, when we create a WebForm called "WebForm1.aspx", instead of inheriting from "System.Web.UI.Page"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.