I am trying to bind a label to a datareader. With an input type="text" I am able to do something like this
MyName.Value = reader["MyName"].ToString();
-
<label id="lblMyName" runat="server"></label>
I cant figure out how to bind this in the code behind as I dont see a lblMyName.Value or .Text
Use
lblMyName.InnerText
But, any reason why you don't want to use asp.net Label control.
With this
lblMyName.Text
works.