473,396 Members | 2,098 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.

access user control' s control

js
hi,
I have a user control, but I don't have source code, only have the aspx
file, I added one text (txtMyName) to it, how to access this textbox and get
the value form user input? Please advice, many thanks.
Apr 16 '06 #1
3 4716
Hi,

you can run FindControl against the user control (using ID of the UC) on the
aspx page

Dim txtMyName As TextBox =
DirectCast(MyUserControl1.FindControl("txtMyName") , TextBox)

where "MyUserControl1" is ID of the user control on aspx page

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke
"js" <js@so*****@hotmail.com> wrote in message
news:u0**************@TK2MSFTNGP02.phx.gbl...
hi,
I have a user control, but I don't have source code, only have the aspx
file, I added one text (txtMyName) to it, how to access this textbox and
get the value form user input? Please advice, many thanks.

Apr 17 '06 #2
js
Thanks Teemu ...
"Teemu Keiski" <jo****@aspalliance.com> wrote in message
news:uU*************@TK2MSFTNGP02.phx.gbl...
Hi,

you can run FindControl against the user control (using ID of the UC) on
the aspx page

Dim txtMyName As TextBox =
DirectCast(MyUserControl1.FindControl("txtMyName") , TextBox)

where "MyUserControl1" is ID of the user control on aspx page

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke
"js" <js@so*****@hotmail.com> wrote in message
news:u0**************@TK2MSFTNGP02.phx.gbl...
hi,
I have a user control, but I don't have source code, only have the aspx
file, I added one text (txtMyName) to it, how to access this textbox and
get the value form user input? Please advice, many thanks.


Apr 17 '06 #3
js
Thanks for the help,
Can I assign a value to it?

"Teemu Keiski" <jo****@aspalliance.com> wrote in message
news:uU*************@TK2MSFTNGP02.phx.gbl...
Hi,

you can run FindControl against the user control (using ID of the UC) on
the aspx page

Dim txtMyName As TextBox =
DirectCast(MyUserControl1.FindControl("txtMyName") , TextBox)

where "MyUserControl1" is ID of the user control on aspx page

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke
"js" <js@so*****@hotmail.com> wrote in message
news:u0**************@TK2MSFTNGP02.phx.gbl...
hi,
I have a user control, but I don't have source code, only have the aspx
file, I added one text (txtMyName) to it, how to access this textbox and
get the value form user input? Please advice, many thanks.


Apr 23 '06 #4

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

Similar topics

4
by: Ben R. | last post by:
Hello, I've got a text-based .inc file that I'm using for my asp.net site's header. I thought about a user control, but if possible, I'd like to avoid it for simplicity's sake. In the main page,...
3
by: Random Person | last post by:
Does anyone know how to use VBA to relink tables between two MS Access databases? We have two databases, one with VBA code and the other with data tables. The tables are referenced by linked...
6
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...
49
by: Yannick Turgeon | last post by:
Hello, We are in the process of examining our current main application. We have to do some major changes and, in the process, are questionning/validating the use of MS Access as front-end. The...
2
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...
2
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...
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");...
5
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...
5
by: c676228 | last post by:
Hi, I guess I am confused. In aspx script, I mean (you won't use Codebehind="enrollinfo.aspx.vb", but mix code with html and code together) You can access user control's property directly. Since I...
37
by: Allen Browne | last post by:
If you develop for others, you probably have multiple versions of Access installed so you can edit and create MDEs for clients in different versions. This works fine under Windows XP, even with...
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:
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...
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:
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
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
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...

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.