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. 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.
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.
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.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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,...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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");...
|
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...
|
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...
|
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...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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: 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...
|
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,...
|
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...
|
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...
| |