bind to label or literal control

I have a user control with two label controls.  Is it possible to databind to a label or literal control either declaratively or programmatically?

I was trying to bind using the Eval expression in the text attribute, but that doesn't work.  I think that has to be within a databound control like gridview, formview, detailsview, etc.

Any help is greatly appreciated.
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Quotes.ascx.cs" Inherits="controls_Quotes" %>
<asp:Label ID="Label1" runat="server" Text='<%# Eval("quote_text") %>'></asp:Label>
<asp:Label ID="Label2" runat="server" Text='<%# Eval("quote_author") %>'></asp:Label>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
    OldValuesParameterFormatString="original_{0}" SelectMethod="getQuotes" 

Open in new window

Who is Participating?
Muhammad Ousama GhazaliConnect With a Mentor Solution Analyst & ArchitectCommented:
Please check this link and a careful/concentrated reading is suggested to grap the complete idea:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.