Q:

Autofac and WebForms - passing non-constant parameters, resolved parameters? 

I'm just getting started with Autofac and I have the following code:
public class _default : System. Web. UI.Page, IUserInformationProvider
{
    protected void Page_Load(object sender, System. EventArgs e)
    {
        ControllerFactory cf;
        using (scope == ((Global_asax)this. Context. ApplicationInstance).ContainerProvider. ApplicationContainer. BeginLifetimeScope()) {
            cf = scope. Resolve<IControllerFactory>();  // <-- would love to pass "this" somewhere here, but how??? 
        }
    }

}

ControllerFactory is defined below and also takes an IUserInformationProvider interface.   I would like to pass the instance of the WebForm as a parameter to Resolve IControllerFactory.   
public class ControllerFactory : IControllerFactory
{
    protected IUserInformationProvider _userInformation;
    public ControllerFactory(IUserInformationProvider userInformation)
    {
        _userInformation = userInformation;
    }
}

Looking through the documentation, I see that there are 3 parameter types (Named, Typed, Resolved), but the first 2 take only constant values.   It seems like Resolved parameters are the way to go, but I'm kind of lost as to how to implement it, or if that's even the right strategy.   And what would the builder. Register look like? 

A:

You can pass additional parameter not just when registering but when resolving a type.  
The ResolvedParameter can only be used if your IUserInformationProvider was already registered in the container so it probably won't work in your case. 
However you can use NamedParameter where you need to pass the parameter name what you have used in the contrustor so "userInformation" and the value this:
cf = scope. Resolve<IControllerFactory>(
    new NamedParameter("userInformation", this));

Or you can use the TypedParameter where you need to pass the type of the parameter in this case typeof(IUserInformationProvider) and again the value of this:
cf = scope. Resolve<IControllerFactory>(
    new TypedParameter(typeof(IUserInformationProvider), this));

If you are looking for some general guide about how you can integrate WebForms with Autofac you can start with the documentation

