473,789 Members | 2,931 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Re-using asp:label

I do some design work on a website that up until to now has been
limited to defining CSS and HTML elements. Excuse me if I am using
incorrect terminology, I am just starting out in this.

I would like to try some beginning coding and the developers are giving
me some latitude to experiment. They said that I can use INLINE VB
code.

I would like to create an ASCX file that uses some labels that are on
the parent page that that ascx file will be called from. The labels I
want to use are-

<asp:Label ID="lblQuery" Visible="False" Runat="server"> </asp:Label>

<asp:Label ID="lblCategory " Visible="False" Runat="server"> </asp:Label>

Can any of you lend a hand or point me to a tutorial that specifically
addresses this type of thing?

Thanks much,

RD

Nov 19 '05 #1
2 1449
RD,

I suggest trying the www.gotdotnet.com tutorials. Click the toolbox link on
the bottom left and you'll see a link to the tutorials.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
<fo**********@g mail.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
I do some design work on a website that up until to now has been
limited to defining CSS and HTML elements. Excuse me if I am using
incorrect terminology, I am just starting out in this.

I would like to try some beginning coding and the developers are giving
me some latitude to experiment. They said that I can use INLINE VB
code.

I would like to create an ASCX file that uses some labels that are on
the parent page that that ascx file will be called from. The labels I
want to use are-

<asp:Label ID="lblQuery" Visible="False" Runat="server"> </asp:Label>

<asp:Label ID="lblCategory " Visible="False" Runat="server"> </asp:Label>

Can any of you lend a hand or point me to a tutorial that specifically
addresses this type of thing?

Thanks much,

RD

Nov 19 '05 #2
You will have to create public properties on the UserControl (ASP.NET 2.0)
and manage them from the container page.
(This is a great new feature in ASP.NET 2.0) After dropping the control on a
page, the public properties are immediately available. (No need to load
control and cast it as in ASP.NET 1.1)

In the property set the label fields text directly: eg: In the ascx
public string Query
{
set { lblQuery.Text = value; }
get { return lblQuery.Text; }
}

Gerhard

<fo**********@g mail.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
I do some design work on a website that up until to now has been
limited to defining CSS and HTML elements. Excuse me if I am using
incorrect terminology, I am just starting out in this.

I would like to try some beginning coding and the developers are giving
me some latitude to experiment. They said that I can use INLINE VB
code.

I would like to create an ASCX file that uses some labels that are on
the parent page that that ascx file will be called from. The labels I
want to use are-

<asp:Label ID="lblQuery" Visible="False" Runat="server"> </asp:Label>

<asp:Label ID="lblCategory " Visible="False" Runat="server"> </asp:Label>

Can any of you lend a hand or point me to a tutorial that specifically
addresses this type of thing?

Thanks much,

RD

Nov 19 '05 #3

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

Similar topics

2
5479
by: Spartanicus | last post by:
Is this correct usage of <label>?: <h5><label for="sp-q"><img src="search.png" alt="Search"></label></h5> <form method="get" action="http://search.atomz.com/search/"> <div> <input name="sp-q" id="sp-q"> <input type="submit" value="Search this site">
1
1727
by: Label over bitmap display | last post by:
Hello, I hope that someone can help me. I am developing code with C# .NET to display units which are on a Serial (RS232) Network. For my display I have to use a bitmap of the item and on top of the bitmap I have to display the device number. I thought about putting the device number in a label over the bitmap but the label does not blend in with the bitmap. Is there a way to make the label transparent so that the bitmap will show...
8
4450
by: David McDivitt | last post by:
We have a massive java application to be made ADA compliant. We want onfocus and onblur events for each text field. The best way seems to be javascript, by cycling through all the nodes recursively after page load, and attaching the events. We already cycle through everything to set tabs. If nodename is LABEL, we should be able to use the FOR attribute, get the object referenced, and attach events on that object. When cycling through...
31
7247
by: jcrouse | last post by:
Is there a quick and easy way to change the color of a label controls border from the default black to white? Thank you, John
3
3849
by: Mike | last post by:
Need some help with passing a label to a subroutine. I have a form with lots of checkboxes. When the form loads i have a procedure that runs to lookup values and check the appropriate boxes. If the box is checked I want the label to look like a hyperlink. Then the user can click on the label to open a new form that is linked to the checkbox. I had to make labels that were not attached to the checkboxes. If you click a label that is...
2
7961
by: André Hänsel | last post by:
Hi again, I have a radio button: <p> <input id="v_yes" type="radio" name="v" value="yes" /> <label for="v_yes">Ja</label> <input id="v_no" type="radio" name="v" value="no" /> <label for="v_no">Nein</label> </p>
1
12311
by: Patrick Lioi | last post by:
Label label = new Label(); label.Width = 1; label.AutoSize = true; label.Text = "A long string, requiring a width larger than 1."; //At this point, Width is still 1. What am I missing? Shouldn't AutoSize adjust the "Size" "Auto"matically to fit the string?
4
6545
by: =?Utf-8?B?cmFuZHkxMjAw?= | last post by:
I have two labels on a form. The text for these two labels is assigned at runtime. lblLeft lblRight If the text for lblLeft is wider than the default, the text runs into lblRight. How do I make lblLeft automatically expand to the left?
2
4998
by: Greg (codepug | last post by:
I have created a LABEL, and placed it on top of a button. When I press the button, the label disappears under the button. Is there a way to get the LABEL to stay on top of the button, or reappear after the button is clicked ? I need the Label to remain an object seperate from the button. Greg
6
8853
by: Miro | last post by:
Is there a way to / or a mathematical formula to see if a font size is 'too big' for a label. I have a label that is docked to 'fill' a form, and I want to resize that font based on the width and height of the label. So far I have something like this on the Form_Resize event: Label2.Font = New Font(Label2.Font.Name, _ Label2.Size.Height - 100, Label2.Font.Style)
0
9511
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10410
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, 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...
0
10200
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9020
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, 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...
1
7529
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6769
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();...
0
5418
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3701
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2909
bsmnconsultancy
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...

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.