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

How to access values entered in User control in the main page.

Hi all,

i have a user control which allows the user to enter Name& Address in text
boxes.

I use the same user control in the main page...

Is there a simple way of accessing the Name & address entered in the text
boxes of the user control in the main page(Page hosting the user control
using Resgister directive.).

Any pointers will be helpful.

regards
Vineet Batta
--
MCAD
Vineet Batta
Nov 18 '05 #1
2 1367
You could expose Name and Address as public properties of the user
control class (that get the values from the text boxes). Then add a
field to the page class of the user control type and refer to those
properties when you need them. Make sense?

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Sat, 6 Nov 2004 15:31:04 -0800, "vineetbatta"
<vi*********@discussions.microsoft.com> wrote:
Hi all,

i have a user control which allows the user to enter Name& Address in text
boxes.

I use the same user control in the main page...

Is there a simple way of accessing the Name & address entered in the text
boxes of the user control in the main page(Page hosting the user control
using Resgister directive.).

Any pointers will be helpful.

regards
Vineet Batta


Nov 18 '05 #2
I noticed your MCAD signature, so I will assume you've already tried to get
the user input from the textboxes by something like this... tbxMyName.Text
on the back end. Assuming this control of your's in an ascx module, have you
tried to call something like this in your code-behind...
this.FindControl("tbxMyName")? It looks like you have a user control with a
Name and address textbox, that you have loaded twice on the page, is that
right? If this is true, when your control is posted back, can you tell what
instance it was? Is there a button causing the post back? If you can provide
a little more information it might be easier to understand your situation.

--
Alex Mueller

"vineetbatta" <vi*********@discussions.microsoft.com> wrote in message
news:02**********************************@microsof t.com...
Hi all,

i have a user control which allows the user to enter Name& Address in text boxes.

I use the same user control in the main page...

Is there a simple way of accessing the Name & address entered in the text
boxes of the user control in the main page(Page hosting the user control
using Resgister directive.).

Any pointers will be helpful.

regards
Vineet Batta
--
MCAD
Vineet Batta

Nov 18 '05 #3

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

Similar topics

9
by: Anders K. Jacobsen [DK] | last post by:
Hi I have this that adds some usercontrol (UCTodays.ascx) to a placeholder foreach(A a in B){ UCTodays ucline = (UCTodays )LoadControl("UCTodays.ascx");...
7
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...
2
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
6
by: kresimirt | last post by:
Hi, I am trying to enhance the functionality of my web site which is hard with my limited knowledge of web developing. The idea is the following: On the main web page there is a show_hide script...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
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...

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.