views:

27

answers:

1

which process or class is responsible for converting aspx files and data-binding expressions into c# ?

for example

<%# Eval("XXXXX") %>

is transformed into:

    public void @__DataBind__control118(object sender, System.EventArgs e)
    {
        System.Web.UI.WebControls.RepeaterItem Container;
        System.Web.UI.DataBoundLiteralControl target;

        #line 383 ""
        target = ((System.Web.UI.DataBoundLiteralControl)(sender));

        #line default
        #line hidden

        #line 383 ""
        Container = ((System.Web.UI.WebControls.RepeaterItem)(target.BindingContainer));

        #line default
        #line hidden

        #line 383 ""
        target.SetDataBoundString(0,
           System.Convert.ToString(Eval("XXXXX"), System.Globalization.CultureInfo.CurrentCulture));

        #line default
        #line hidden
    }

could this be customised ?

A: 

The tool that handles ASP.NET precompilation is aspnet_compiler.exe

I'm not familiar with the extensibility/customization options of it--however I've seen people pre-compile sites for deployment with it manually; which leads me to believe you could at least write an alternative of it (even if you can't customize it).

STW