Rock.Web.UI.Controls.LiquidFieldTemplate.lOutputText_DataBinding C# (CSharp) 메소드

lOutputText_DataBinding() 개인적인 메소드

Handles the DataBinding event of the lOutputText control.
private lOutputText_DataBinding ( object sender, EventArgs e ) : void
sender object The source of the event.
e System.EventArgs The instance containing the event data.
리턴 void
        private void lOutputText_DataBinding( object sender, EventArgs e )
        {
            Literal lOutputText = sender as Literal;
            GridViewRow gridViewRow = lOutputText.NamingContainer as GridViewRow;
            if ( gridViewRow.DataItem != null )
            {
                Dictionary<string, object> mergeValues = this.ToGridItemsDictionary( gridViewRow, gridViewRow.DataItem );
                lOutputText.Text = this.LiquidField.LiquidTemplate.ResolveMergeFields( mergeValues );

                // Resolve any dynamic url references
                string appRoot = ( (RockPage)lOutputText.Page ).ResolveRockUrl( "~/" );
                string themeRoot = ( (RockPage)lOutputText.Page ).ResolveRockUrl( "~~/" );
                lOutputText.Text = lOutputText.Text.Replace( "~~/", themeRoot ).Replace( "~/", appRoot );
            }
        }