473,666 Members | 2,278 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Accessing labels properties within an asp table

I have got the below asp table and I would like to be able to call up the
lblAddress1 label with in the asp table in the code behind page. I tried
doing this.lblAddress 1 and it didn't work and I tried doing
this.tblSearchA ddresses.lblAdd ress1 and it didn't work. Has anyone an idea
how I call this lable with a asp table. Thanks in advance for any help anyone
can give me.

<asp:table id="tblSearchAd dresses" Runat="server" Width="100%">
<asp:TableRow >
<asp:TableCel l>
<asp:Label ID="lblAddress1 " Runat="server"> </asp:Label>
</asp:TableCell>
</asp:TableRow>
<asp:TableRow >
<asp:TableCel l>
<asp:Label ID="lblAddress2 " Runat="server"> </asp:Label>
</asp:TableCell>
</asp:TableRow>

</asp:table>
Nov 16 '05 #1
1 2154
Hi Stephen

Your label is part of the Controls-collection of the containing table
cell. The hierarchy looks like this (table->rows->cells):

//just samples
this.tblSearchA ddresses.Rows[0].Cells[3].Controls[0];
However, you could just maintain a direct reference to your label in
your code - if this.lblAddress 1 doesn't work, it's probably because it's
not declared in your initialization code...

Regards

Philipp
I have got the below asp table and I would like to be able to call up the
lblAddress1 label with in the asp table in the code behind page. I tried
doing this.lblAddress 1 and it didn't work and I tried doing
this.tblSearchA ddresses.lblAdd ress1 and it didn't work. Has anyone an idea
how I call this lable with a asp table. Thanks in advance for any help anyone
can give me.

<asp:table id="tblSearchAd dresses" Runat="server" Width="100%">
<asp:TableRow >
<asp:TableCel l>
<asp:Label ID="lblAddress1 " Runat="server"> </asp:Label>
</asp:TableCell>
</asp:TableRow>
<asp:TableRow >
<asp:TableCel l>
<asp:Label ID="lblAddress2 " Runat="server"> </asp:Label>
</asp:TableCell>
</asp:TableRow>

</asp:table>

Nov 16 '05 #2

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

Similar topics

0
1166
by: Stephen | last post by:
I have the below asp table and I would like to be able to call up the lblAddress1 label with in the asp table in the code behind page. I tried doing this.lblAddress1 and it didn't work and I tried doing this.tblSearchAddresses.lblAddress1 and it didn't work. Has anyone an idea how I call this lable with a asp table. Thanks in advance for any help anyone can give me. <asp:table id="tblSearchAddresses" Runat="server" Width="100%">...
1
2294
by: sbnj | last post by:
I have an existing database up and running great but im looking to ad some new features. I currently import a "new orders" file everyday the file contains order #, item #, qty ordered etc... when ou products are made I print product barcode labels from a separat program on a laser printer using full sheets (14 labels per sheet). I want to be able to print the data/barcode labels from a menu withi access to a single label thermal printer...
5
1707
by: Jonathan Williams | last post by:
Hi, I have an object which inherits from WebControl (CUSTOM : WebControl) In this object I have code in which I add child contols: protected override void CreateChildControls() { //this.Controls.Clear(); CustomFieldUtil objCustomFieldUtil = new CustomFieldUtil(); DataTable objDT = objCustomFieldUtil.GetDataTable("custom"); for(intCount = 0; intCount < objDT.Rows.Count; intCount++)
3
1638
by: Craig G | last post by:
i have a user control which is basically a datagrid, which has add/edit/delete buttons on the grid is there anyway of accessing the actual datagrid from the form itself? basically i want to set the add/edit/delete options visble/invisible on the datagrid depending on the users's role, but found that i cannot access the grid to do this. is the only way of setting it in the page load of the usercontrol itself?
6
2244
by: arvee | last post by:
Is there a way to access controls (and their properties) in a user control? The Web Form Designer marks controls as 'Protected' which makes them inaccessable from the host form. If I mark them as Public, I can access them, but the next time the controls are manipulated in the design mode, they are converted back to Protected. Is there an obvious/easy way around this? Thanks.
2
13504
by: Mikey | last post by:
Sample VB .NET source code to create mailing labels or customized letters using MS Word MailMerge This VB .NET source code will start MS Word and call methods and set properties in MS Word to execute a MailMerge to create mailing labels or customized letters. A label name known to MS Word MailMerge mailing label wizard may be used or a template file containing the field names Line1 thru Line5 for each record to be printed. If a...
8
2736
by: dwok | last post by:
I have been wondering this for a while now. Suppose I have a class that contains some private member variables. How should I access the variables throughout the class? Should I use properties that expose the variables or is it OK to just access the variables directly? Keep in mind that I am talking about accessing the variables from within the class that they are defined. Thanks!
3
1949
by: Paul | last post by:
I am using Visual Studio.net 2005 (and asp.net 2.0) Let's say that in a Web Project, I have created a (Dataset?) called SomeDataset.xsd. On it I have a TableAdapter called SomeTableTableAdapter and a query called GetSomeInfoQuery. In an aspx page I used an ObjectDataSource, and chose as the business object SomeDataSetTableAdapters.SomeTableTableAdapter, then the method GetSomeInfoQuery.
4
4000
by: evantay | last post by:
I'm using ASP.NET 2.0 with VS.NET 2005. I'm trying to access properties from my master pages within a page that inherits from that master page (a child page). However the values are always null. In my masterpage I have this: private bool m_AlreadyTested; public bool AlreadyTested { get { return m_AlreadyTested; }
0
8355
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
8866
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...
1
8550
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,...
0
8638
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 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...
0
7381
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
6191
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
5662
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();...
1
2769
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
2
2006
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.