473,396 Members | 1,813 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,396 software developers and data experts.

read variable from content page to usercontrol in masterpage

Hi,
I havea variable in cotent page. I want to read that variable into
usercontrol located in master page.
Is there any trick to read it in usercontrol?

Thank you in advance.

Shailesh
Dec 3 '07 #1
2 3674
the proper way is to define an interface (in app_code) and have pages
that have the variable implement the interface. then the master page can
just cast this.Page to the interface and access the variable. this way
the master page can easily detect pages that do not.
-- bruce (sqlwork.com)
Shailesh Patel wrote:
Hi,
I havea variable in cotent page. I want to read that variable into
usercontrol located in master page.
Is there any trick to read it in usercontrol?

Thank you in advance.

Shailesh

Dec 3 '07 #2
Hi Bruce,
Can you please give me some short example to understand better.
I apperetiate your feedback.

Thank you.

"bruce barker" <no****@nospam.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
the proper way is to define an interface (in app_code) and have pages that
have the variable implement the interface. then the master page can just
cast this.Page to the interface and access the variable. this way the
master page can easily detect pages that do not.
-- bruce (sqlwork.com)
Shailesh Patel wrote:
>Hi,
I havea variable in cotent page. I want to read that variable into
usercontrol located in master page.
Is there any trick to read it in usercontrol?

Thank you in advance.

Shailesh

Dec 3 '07 #3

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

Similar topics

5
by: Federico | last post by:
I have a problem, I have an event declared in a Master Page, and I want to use in a Content Page holder of a Content Page. When I want to create the method to handle the event, I can njot reference...
5
by: Paul | last post by:
I have a MasterPage that has on it several UserControls (*ascx files). I wish to control the visibility of the controls on the content pages according to some parameter (for example on a user...
3
by: Alex Maghen | last post by:
Hi. I'm a little confused about the code that resides in the code-behind of a MasterPage and the code that resides in the code-behind of the actual pages that USE that MasterPage. I'm noticing,...
0
by: Ben S | last post by:
vs2005, .net fw 2.0 the questions is, how can I cause the label to change in my client page triggered by an event raised from the user control which is on my master page. I have a master page...
5
by: Dinu | last post by:
How to Cast a Variable to User control in ASP.NET using vb.net as code- behind
0
by: jediknight | last post by:
I have a simple project where there is a master page called MasterPage.master and some webforms which are content pages. I also have a usercontrol which is a simple calendar control popup. The...
1
by: pierre | last post by:
Hi, I have a DataList inside a UserControl, which I use on a MasterPage. My ContentPage lists items which a user can add to his/her shopping basket. Can someone PLEASE let me know how I can...
8
by: Mort Strom | last post by:
Right now the header of my master page contains all of the CSS styles for all of the pages that might be loaded in my ContentPlaceHolder. The problem is that my <styletag is getting too large to...
10
by: =?Utf-8?B?RGFuaQ==?= | last post by:
Hi, Trying to create a master page that holds a menu, and the menu switches between pages in the site. 2 problem arrosed: a. When I navigate from page to page (all AJAX Web Forms, with the...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.