Click here to Skip to main content
12,072,067 members (57,896 online)
Rate this:
 
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 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 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
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.160208.1 | Last Updated 22 Apr 2013
Copyright © CodeProject, 1999-2016
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