Is there a consistent way to find out the id of child controls of the
UserControl.
Should I just use this.name+"_+co ntrol.Id;?
Shimon 6 1397
In the code behind of your user control, did you add your controls as public
properties? Or are you talking about something totally different?
"Shimon Sim" <sh**********@c ommunity.nospam > wrote in message
news:uQ******** *****@TK2MSFTNG P12.phx.gbl... Is there a consistent way to find out the id of child controls of the UserControl.
Should I just use this.name+"_+co ntrol.Id;? Shimon
You probably shouldn't just use that
What is it you are trying to do? No doubt a better solution exists...
Karl
--
MY ASP.Net tutorials http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying) http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Shimon Sim" <sh**********@c ommunity.nospam > wrote in message
news:uQ******** *****@TK2MSFTNG P12.phx.gbl... Is there a consistent way to find out the id of child controls of the UserControl.
Should I just use this.name+"_+co ntrol.Id;? Shimon
I need to register some script block.
The idea of the control is to show Modal Dialog showModalDialog () and insert
some values in the hidden txtboxes of the UserControl. For this I need to
know id of the hidden boxes (i just use TextBox for that with
Attributes.Add( "style"."displa y: none")
names of text boxes are static. - I just add them in the designer - no
dinamic code for this.
Thanks,
Shimon.
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:eY******** ******@TK2MSFTN GP15.phx.gbl... You probably shouldn't just use that
What is it you are trying to do? No doubt a better solution exists...
Karl
-- MY ASP.Net tutorials http://www.openmymind.net/ - New and Improved (yes, the popup is annoying) http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to come!) "Shimon Sim" <sh**********@c ommunity.nospam > wrote in message news:uQ******** *****@TK2MSFTNG P12.phx.gbl... Is there a consistent way to find out the id of child controls of the UserControl.
Should I just use this.name+"_+co ntrol.Id;? Shimon
I think you can do this by creating public properties in the user control.
Then you would be able to get the idea of a textbox in the user control like
this:
ControlName.Pub licPropertyName .ClientID
In the user control you create a public property of type Textbox.
"Shimon Sim" <sh**********@c ommunity.nospam > wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. .. I need to register some script block. The idea of the control is to show Modal Dialog showModalDialog () and insert some values in the hidden txtboxes of the UserControl. For this I need to know id of the hidden boxes (i just use TextBox for that with Attributes.Add( "style"."displa y: none") names of text boxes are static. - I just add them in the designer - no dinamic code for this. Thanks, Shimon.
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net> wrote in message news:eY******** ******@TK2MSFTN GP15.phx.gbl... You probably shouldn't just use that
What is it you are trying to do? No doubt a better solution exists...
Karl
-- MY ASP.Net tutorials http://www.openmymind.net/ - New and Improved (yes, the popup is annoying) http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to come!) "Shimon Sim" <sh**********@c ommunity.nospam > wrote in message news:uQ******** *****@TK2MSFTNG P12.phx.gbl... Is there a consistent way to find out the id of child controls of the UserControl.
Should I just use this.name+"_+co ntrol.Id;? Shimon
I think that I just need ClientID property.
Thanks.
Shimon.
"Kim Quigley" <ki********@hot mail.com> wrote in message
news:uZ******** ******@TK2MSFTN GP09.phx.gbl... I think you can do this by creating public properties in the user control. Then you would be able to get the idea of a textbox in the user control like this:
ControlName.Pub licPropertyName .ClientID
In the user control you create a public property of type Textbox.
"Shimon Sim" <sh**********@c ommunity.nospam > wrote in message news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..I need to register some script block. The idea of the control is to show Modal Dialog showModalDialog () and insert some values in the hidden txtboxes of the UserControl. For this I need to know id of the hidden boxes (i just use TextBox for that with Attributes.Add( "style"."displa y: none") names of text boxes are static. - I just add them in the designer - no dinamic code for this. Thanks, Shimon.
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net> wrote in message news:eY******** ******@TK2MSFTN GP15.phx.gbl... You probably shouldn't just use that
What is it you are trying to do? No doubt a better solution exists...
Karl
-- MY ASP.Net tutorials http://www.openmymind.net/ - New and Improved (yes, the popup is annoying) http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to come!) "Shimon Sim" <sh**********@c ommunity.nospam > wrote in message news:uQ******** *****@TK2MSFTNG P12.phx.gbl... Is there a consistent way to find out the id of child controls of the UserControl.
Should I just use this.name+"_+co ntrol.Id;? Shimon
Glad you were able to figure it out
"Shimon Sim" <sh**********@c ommunity.nospam > wrote in message
news:uF******** ******@TK2MSFTN GP15.phx.gbl... I think that I just need ClientID property. Thanks. Shimon. "Kim Quigley" <ki********@hot mail.com> wrote in message news:uZ******** ******@TK2MSFTN GP09.phx.gbl...I think you can do this by creating public properties in the user control. Then you would be able to get the idea of a textbox in the user control like this:
ControlName.Pub licPropertyName .ClientID
In the user control you create a public property of type Textbox.
"Shimon Sim" <sh**********@c ommunity.nospam > wrote in message news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..I need to register some script block. The idea of the control is to show Modal Dialog showModalDialog () and insert some values in the hidden txtboxes of the UserControl. For this I need to know id of the hidden boxes (i just use TextBox for that with Attributes.Add( "style"."displa y: none") names of text boxes are static. - I just add them in the designer - no dinamic code for this. Thanks, Shimon.
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net> wrote in message news:eY******** ******@TK2MSFTN GP15.phx.gbl... You probably shouldn't just use that
What is it you are trying to do? No doubt a better solution exists...
Karl
-- MY ASP.Net tutorials http://www.openmymind.net/ - New and Improved (yes, the popup is annoying) http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to come!) "Shimon Sim" <sh**********@c ommunity.nospam > wrote in message news:uQ******** *****@TK2MSFTNG P12.phx.gbl... > Is there a consistent way to find out the id of child controls of the > UserControl. > > Should I just use this.name+"_+co ntrol.Id;? > Shimon >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: james |
last post by:
I have a custom UserControl, which can have many sub class levels
derived from it. I want to be able to discover all the components at
Load time, but the only components I can see from the base class
are the private components internal to the base class itself. What
I want are ALL components for the entire class no matter how many
levels of sub-classing this particular control contains.
I do not want to have to force the child classes to...
|
by: Dave Veeneman |
last post by:
Is there a simple way to pass drag-and-drop events to a child control in a
UserControl?
Here's an example: I have created a UserControl which contains a treeview
and some text boxes. I want to be able to drag-and-drop to the treeview from
outside the UserControl. Now, when I drag over the treeview in the
UserControl, the UserControl gets the drag-and-drop events, but the treeview
doesn't.
Is there a simple way to pass drag-and-drop...
|
by: Scott McChesney |
last post by:
I have a problem I hope you folks can help me with.
I have an application that is using a tab-based interface, with the ability
for users to drag an item from a ListBox onto the tab control. This will
create a new tab, put a new instance of the proper UserControl into the tab,
and populate said UserControl with the data culled from the drop source.
Because of the nature of this application, the particular UserControl that
will be...
|
by: Charles Law |
last post by:
For some reason, when I click the X to close my MDI parent form, the action
appears to be re-directed to one of the MDI child forms, and the parent
remains open. I am then unable to close the application.
What should happen, is that the main MDI form should close, taking the child
forms with it. There is code to loop through the child forms, remove the
controls on each of them, and then close the form, but this code should
execute only...
|
by: lotus |
last post by:
HI All..
I'm realtively new to C#.
I have MainForm which includes Parent usercontol, and this parent
usercontrol also contains child usercontrol.
MainForm --> Parent usercontrol --> child usercontrol
Parent usercontol has one button to change the child usercontorl's
variable.
| |
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...
|
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...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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...
|
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...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
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...
| |