Q:

Fields and FieldLinks return the same two values for all Content Types

I have an application that loads all of my content types into a drop down list.  When an item in the drop down list is selected I would like to get a list of the columns for that content type but each one only returns Title and ContentType.  Here is the code I am using:
    protected void ddl_ContentTypes_SelectedIndexChanged(object sender, EventArgs e)
    {
        SPContentType ct = new SPContentType(SPBuiltInContentTypeId.Document,SPContext.Current.Web.ContentTypes,ddl_ContentTypes.SelectedValue);
        foreach (SPField f in ct.Fields)
        {
           //do stuff with each field.  Only returns Title and ContentType
        }
    }

Is there something I should be doing differently.  Is it bad that I am using the built in Document content type for the ParentContentType?

A:

According to MSDN, this construction will create new blank content type with ddl_ContentTypes.SelectedValue as it's name:
SPContentType ct = new SPContentType(
    SPBuiltInContentTypeId.Document,
    SPContext.Current.Web.ContentTypes,
    ddl_ContentTypes.SelectedValue);

What you do need, is to retrieve one of the existing content types, based on it's name. Please, try this code instead of the fragment above:
SPContentType ct = SPContext.Current.Web.ContentTypes[ddl_ContentTypes.SelectedValue];

