473,782 Members | 2,458 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Access a Control from Another Page

Hello -

I have a registration page that could be altered slightly for different
kinds of registrations if I was able to access the show/hide, enable/disable
features from a page where people select the type of registration they would
like. They select it with a radiobuttonlist , click submit and then are taken
to the registration page.

I am trying to avoid having a couple of different registration pages. How
do I access the properties of a control on one page from another page?
--
Sandy
Nov 19 '05 #1
2 1881
Sandy, if I understand your requirements, I'd probably not go to a second page.

You can have two panels on one page--one for the selection and one for the
actual registration. Show the first on entry, then show the second once they
choose. Better yet imho is to skip panels and do a user control for the
registration piece, exposing the various properties you want to change, and
setting visible=true after they choose (or add it dynamically). Advantage of
a user control is that it's easier to put on another page someday, and for me
cleaner than mucking up a panel.

You can do the two page thing, but it doesn't sound like you'd ever go
directly to page 2, and with two pages you'll need to pass the selection
either via query string, context (w/server.transfer ), session, etc., and it's
a little more work than you might need. With one page all your data is right
there, whether it's hidden or not. One page also makes it way easier when you
need to add steps two, three, and four someday.

Does that help?

Bill

"Sandy" wrote:
Hello -

I have a registration page that could be altered slightly for different
kinds of registrations if I was able to access the show/hide, enable/disable
features from a page where people select the type of registration they would
like. They select it with a radiobuttonlist , click submit and then are taken
to the registration page.

I am trying to avoid having a couple of different registration pages. How
do I access the properties of a control on one page from another page?
--
Sandy

Nov 19 '05 #2
Dear Bill:

Thanks for your response. Yes, it did help!

Sandy

"Bill Borg" wrote:
Sandy, if I understand your requirements, I'd probably not go to a second page.

You can have two panels on one page--one for the selection and one for the
actual registration. Show the first on entry, then show the second once they
choose. Better yet imho is to skip panels and do a user control for the
registration piece, exposing the various properties you want to change, and
setting visible=true after they choose (or add it dynamically). Advantage of
a user control is that it's easier to put on another page someday, and for me
cleaner than mucking up a panel.

You can do the two page thing, but it doesn't sound like you'd ever go
directly to page 2, and with two pages you'll need to pass the selection
either via query string, context (w/server.transfer ), session, etc., and it's
a little more work than you might need. With one page all your data is right
there, whether it's hidden or not. One page also makes it way easier when you
need to add steps two, three, and four someday.

Does that help?

Bill

"Sandy" wrote:
Hello -

I have a registration page that could be altered slightly for different
kinds of registrations if I was able to access the show/hide, enable/disable
features from a page where people select the type of registration they would
like. They select it with a radiobuttonlist , click submit and then are taken
to the registration page.

I am trying to avoid having a couple of different registration pages. How
do I access the properties of a control on one page from another page?
--
Sandy

Nov 19 '05 #3

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

Similar topics

20
1638
by: Allen Browne | last post by:
To help you avoid some of the more common and long-standing bugs in Access, the page: http://allenbrowne.com/tips.html contains a new section entitled, "Flaws in Access". The section currently identifies 9 problem areas, with others to be added. It includes a sample Access 2000 database to demonstrate several of the flaws. If you have been working with Access, you will be aware of some of them. Our aim is to prevent you grief by...
6
4753
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much appreciated. Thanks in advance
2
3024
by: paul meaney | last post by:
All, myself and another developer have been staring blankly at a screen for the past 48 hours and are wondering just what stunningly obvious thing we are missing. We are trying to load up 2 or more user controls dynamically by adding to a placeholder defined in page_load. I've included the sample code for how we are accessing one. The user controls are not rocket science - just a few text boxes with public accessor properties. We've...
3
7144
by: qwerty | last post by:
I have two User controls in a page. Them ID-propertys are example UC1 and UC2. In code behind file they are declared: Public UC1 As UC1 Public UC1 As UC1 From the page I can call them with their name (UC1 and UC2) and access their public propertys and functions.
2
2357
by: Jon Hyland | last post by:
This might be a dumb question, but what is the best way for one instance of a user control to access properties of an instance of another user control? For example, let's say I have an instance of UserControlA (ucA1) and an instance of UserControlB (ucB1) on a particular ASP.NET page. UserControlA has a string property called StringA that gets generated from a DB call in it's Page_Load event. I want UserControlB to be able to access...
5
3052
by: djscratchnsniffing | last post by:
i know you can access an ascx's properties/methods from an aspx file. Let's say you have an aspx file with two code-behind files(ascx files). Can you access one of the ascx file's properties/methods from the other ascx file?
5
7672
by: Steve Richter | last post by:
In my user control I want to read the ViewState dictionary of the Parent control. But this sensible idea is not permitted by the compiler: Compiler Error Message: CS1540: Cannot access protected member 'System.Web.UI.Control.ViewState' via a qualifier of type 'System.Web.UI.Control'; the qualifier must be of type 'ASP.ItemOrderGrid' (or derived from it) Source Error:
2
1980
by: N. Demos | last post by:
I have a user control with code behind of which two instances are created/declared in my aspx page. The aspx page has code behind also, as I need to access methods of the usercontrols on page submit. I've read several post here and articles on the web on this topic. What little I have learned from them is that you have to pre-compile the usercontrol in order to access it in the aspx code behind. I did this, compiling the usercontrol...
7
2300
by: Andy B | last post by:
I have a class I am creating for data access. I need to access controls from inside the class that are on a particular page. How do I do this? or is creating an instance of the page class and using FindControl the only way to do it?
0
9641
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10313
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9944
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8968
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7494
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5378
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3643
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2875
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.