473,473 Members | 1,984 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

display a value twice on one page

aad
Hi,

I would like to display a label twice on one page.

Duplicate the label result in the error "The ID 'xxxxx' is already
used by another control"
Ok I understand that it can bind to only one control. However I not
able to fix this at the code behind since it is in a dll.

What options do I have to display the value multiple times (javascript?
sessions?)

Can someone please provide me some hints/ solution / example of how to
do this?

Thank You very much,

Aad

Jun 14 '06 #1
5 1356
"aad" <ro@nedap.nl> wrote in message
news:11**********************@y41g2000cwy.googlegr oups.com...
What options do I have to display the value multiple times (javascript?
sessions?)


Immediately after you've bound the first label...

Label2.Text = Label1.Text;
Jun 14 '06 #2
aad
Hello Mark.

Thanks for your reply.
How should I implement your suggestion.

The code below doesn't work.
Label1 displays it's value correctly, Label2 shows 'Label2'

-----------------------------------------
<%@ Control Language="c#" AutoEventWireup="false"
Inherits="SPC.ProjectHeader"
TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
<link href="../StyleSheet.css" rel="stylesheet" type="text/css" />

<script language="C#" runat="server">
void Page_Load(Object sender, EventArgs e) {
Label2.Text = Label1.Text; }
</script>

<table width="675" border="0" align="center" cellpadding="0"
cellspacing="0">
<tr align="center" valign="middle" class="navlogobar">
<td style="width: 128px"> </td>
<td width="128" class="gridHeader3"><font size="2">
<font size="2"></font></font> <font size="2">
<asp:Label ID="Label1" runat="server">Project</asp:Label>
<asp:Label ID="Label2" runat="server">Label2</asp:Label>

-----------------------------------------

Jun 15 '06 #3
"aad" <ro@nedap.nl> wrote in message
news:11**********************@p79g2000cwp.googlegr oups.com...
Hello Mark.

Thanks for your reply.
How should I implement your suggestion.

The code below doesn't work.
Label1 displays it's value correctly, Label2 shows 'Label2'


Are you sure the Page_Load event is actually firing...?
Jun 15 '06 #4
aad

Can You pls. advise how to check that?

Ronald

Jun 15 '06 #5
aad
Btw. the labels are in an user control (project.ascx) which will be
include in my mainpage (project_main.aspx)

Jun 15 '06 #6

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

Similar topics

3
by: Tony T | last post by:
I'd really appreciate some help on this one. I've put up a sample page here http://rnetworks2002.users.btopenworld.com/iebug/review.html and the stylesheet's here...
5
by: Homa | last post by:
Hi all, Can anyone give me some links about how to do an async web service call from aspx and display a temperary page before the web service returns? Thanks, Homa Wong
8
by: TS | last post by:
Hi, i have inherited a page from another user. The page is the target frame in a frameset. for some reason the whole page runs twice (page_load, init, etc. all run twice) I can't figure out how...
1
by: philip | last post by:
hello, i am confused about the following aspx page, when the Submit button is clicked, the page will append a number to Label1, but i am wondering why the first row displays twice, would u please...
1
by: rbinington | last post by:
Hi, I am trying to write a DNN module that has the ability to insert articles into an article repository. I want the users to be able to move pages around and enter text into the FCKEditor. I...
3
by: AG | last post by:
Below is code (slightly modified and converted to VB) that was provided to me in response to another post. I am using it to demonstrate another problem. In order for paging and other features to...
17
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I get the value of a form control? -----------------------------------------------------------------------...
5
by: aamirghanchi | last post by:
Hi, I need to know if anyone else came across this. The Session variable value I set in a sortCommand event handler of a datagrid does not hold on till the next sortcommand event handler and...
2
by: wreed06 | last post by:
Hello, I have 2 problems. In my webpage, I have a dropdown list with a button that takes the user to a popup window specific to the option. I am using Firefox 2.0.0.13. I have successfully...
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
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,...
1
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...
0
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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...

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.