Sunday, March 10, 2013

Databinding to a Button Text in ASP.NET, C#


/*********************************************************************************
/* 
/* Databinding to a Button Text in ASP.NET, C#
/* 
/*********************************************************************************
Add this to your ASPX page

background-repeat: no-repeat; background-position: left;
      padding-left: 15px;" runat="server" Height="40px" BorderStyle="None" 
Text='<%#DataBinder.Eval(Container.DataItem,"ColumnName")%>'
      Width="93px" OnClick="ColumnNameChanged" />


    ConnectionString="<%$ ConnectionStrings:myConnectionString %>" 
    SelectCommand="SELECT [ColumnName] FROM [TableName]">