I have a FormView control on an Asp.net web page. One of my controls inside of the FormView is a label control named "lblmyLable". I am trying to set the text value of the label to a C# string variable which in this example shown below is assigned a value in the page load event. However I am getting a runtime error telling me the following:
Parser Error Message: The server tag is not well formed.
In this case it does not like this assignment in my lable below : Text="<%# sample %>"
So to get to the point here, how can I assign a value to my label control? I have also tried using %= tag, but that does not work either. Text="<%= sample %>"
Can someone help me out?
 
Here is a small snippet of the Aspx code in question.
 <asp:FormView ID="FormView1" runat="server" DataSourceID="ObjectDataSource1">        
& ...

Go to the complete details ...