Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET .NET Microsoft
How to Pass value of Label (label.text) to the property of a control in ASPX Page (HTML)
I have a some text in Lable i want to pass this text value to a property of a control.
this is also not working:
proberty="<%# Label1.Text %>
 
Please help me
Posted 19-Apr-13 22:50pm
Edited 19-Apr-13 22:53pm
v2
Comments
Sandeep Mewara at 20-Apr-13 11:24am
   
Can you share a little about what exactly are you doing? Further, is label's text static? If so, why not use/assign it directly in page or codebehind when you know the value?
Shagun Bansal at 20-Apr-13 11:45am
   
Actual i have a value in label u can say some text is contained by a label1 But I want to use that value or text on the html or on aspx page. I can easily acess this on c# code file. Now I have a control on web form and I want to pass its one property equals to that text which is contained by that label. Please help me
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

<asp:label id="lableU" runat="server" text="<%# Label1.Text %>" xmlns:asp="#unknown" />
OR
<asp:label id="lableU" runat="server" text="<%# Label1.Text %>" xmlns:asp="#unknown" />
 
May This Help You.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 5,130
1 DamithSL 4,237
2 Maciej Los 3,700
3 Kornfeld Eliyahu Peter 3,470
4 Sergey Alexandrovich Kryukov 2,846


Advertise | Privacy | Mobile
Web01 | 2.8.141216.1 | Last Updated 22 Apr 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100