473,397 Members | 2,068 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,397 software developers and data experts.

How Do I: Send Text to a control in my User Control

Hello,
I am in ASP.NET using C#.
I have a user control called "progHeader.ascx" that has
a label control call "pageTitle". How do I
call "pageTitle" from my asp page(Inventory.aspx), with
the usercontrol "progheader" dropped on to it, and send
the current page title to "pageTitle"?
Charles
Nov 15 '05 #1
2 1499

Hi Charles,

Thank you for posting in this group.
Is your user control created by yourself or by others?

If it is created by yourself, you can create the label as the public
reference of user control class.
Then you can manipulate the label in the control like this:
WebCustomControl11.Label1.Text="abc";

Also(And more reasonable), you can create a public property for the label
and you can manipulate it through the property.

If the control is not created by yourself and it does not expose any
property or public reference field for the label, it means that the creator
of the usercontrol does not want you to manipulate it, this label is for
some internal usage of this user control.

Hope this helps,

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| Content-Class: urn:content-classes:message
| From: "Charles" <CW******@bellsouth.net>
| Sender: "Charles" <CW******@bellsouth.net>
| Subject: How Do I: Send Text to a control in my User Control
| Date: Fri, 3 Oct 2003 16:59:29 -0700
| Lines: 8
| Message-ID: <1f*****************************@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcOKCmIMy3y+hnzqR1Kn6CzbkEBKIA==
| Newsgroups: microsoft.public.dotnet.languages.csharp
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:188882
| NNTP-Posting-Host: TK2MSFTNGXA14 10.40.1.166
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| Hello,
| I am in ASP.NET using C#.
| I have a user control called "progHeader.ascx" that has
| a label control call "pageTitle". How do I
| call "pageTitle" from my asp page(Inventory.aspx), with
| the usercontrol "progheader" dropped on to it, and send
| the current page title to "pageTitle"?
| Charles
|

Nov 15 '05 #2

Hi Charles,

Thank you for posting in this group.
Is your user control created by yourself or by others?

If it is created by yourself, you can create the label as the public
reference of user control class.
Then you can manipulate the label in the control like this:
WebCustomControl11.Label1.Text="abc";

Also(And more reasonable), you can create a public property for the label
and you can manipulate it through the property.

If the control is not created by yourself and it does not expose any
property or public reference field for the label, it means that the creator
of the usercontrol does not want you to manipulate it, this label is for
some internal usage of this user control.

Hope this helps,

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| Content-Class: urn:content-classes:message
| From: "Charles" <CW******@bellsouth.net>
| Sender: "Charles" <CW******@bellsouth.net>
| Subject: How Do I: Send Text to a control in my User Control
| Date: Fri, 3 Oct 2003 16:59:29 -0700
| Lines: 8
| Message-ID: <1f*****************************@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcOKCmIMy3y+hnzqR1Kn6CzbkEBKIA==
| Newsgroups: microsoft.public.dotnet.languages.csharp
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:188882
| NNTP-Posting-Host: TK2MSFTNGXA14 10.40.1.166
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| Hello,
| I am in ASP.NET using C#.
| I have a user control called "progHeader.ascx" that has
| a label control call "pageTitle". How do I
| call "pageTitle" from my asp page(Inventory.aspx), with
| the usercontrol "progheader" dropped on to it, and send
| the current page title to "pageTitle"?
| Charles
|

Nov 15 '05 #3

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

Similar topics

1
by: Gernot Hillier | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi! I'm the developer of a Linux ISDN application which uses embedded Python for controlling the communication. It starts several threads (i.e....
1
by: dotnet | last post by:
i put the Downloading Control (window user control) using <object> tag in webForm. how to send selected file list in webfForm to win control without <param> ?
7
by: moondaddy | last post by:
I have a user control being used instead of a frame page. when the user clicks on a menu item I need to send the ID (integer value) of that menu as a parameter in the postback of the user control...
9
by: eswanson | last post by:
I have a web page I need to post a file plus some other fields to it. How can I do this from a asp.net page. I know I can send individual fields to the other page, but how do I send a file to the...
4
by: Alexander Widera | last post by:
I have a page with the following code for example: <%@ Page Language="C#" ContentType="text/html" ResponseEncoding="iso-8859-1" Debug="true"%> <script runat="server"> void Page_Load(object...
7
by: Martin | last post by:
Hi, I have a standard aspx page (form) that contains a few user controls. Upon form submission the page is validated. If validation passses then a text based email is sent. This is all working...
10
by: Dennis | last post by:
I am trying to send an e-mail using one of the examples I got on this group as follows: (both toemail and myemail are valid e-mail addreses. 'System.Web.Mail' (requires reference to...
3
by: YMPN | last post by:
Hi Everyone, I'm deen from Riyadh. Please do help me with some problem i have. I have this formview control setup to recieved inputs from user (textbox, dropdownlist, others). After...
4
by: Joseph Geretz | last post by:
We use a Soap Header to pass a token class (m_Token) back and forth with authenticated session information. Given the following implementation for our Logout method, I vastly prefer to simply code...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
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
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...
0
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,...
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
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...
0
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,...
0
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...

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.