locked
Selecting Wizardstep won't step into class in control due to type RRS feed

  • Question

  • User-2066630380 posted

    Hi, very confused about this one. 

    IN my webforms application. Why on God's green earth would creating and returning a new XEelement work in selecting and stepping into GetResults() from a wizardstep in ascx control "PriorityWizardStep" but as soon as it's not a XEelement but a List of PriorityQuestionModel type it won't even step into GetPriorityResults() in that same control? All types and controls are found it's just the xelement somehwhere allows for stepping into. 

    Anyone have a clue? thanks!

    //Works
    var resultsXElement = new XElement("root", this.WizardSteps.OfType<PriorityWizardStep>().Select(s => s.GetResults()));
    // Does not step into GetPriorityResults. List<PriorityQuestionModel> resultsPriorities = (List<PriorityQuestionModel>)this.WizardSteps.OfType<PriorityWizardStep>().Select(p => p.GetPriorityResults());

    Friday, January 29, 2021 2:24 PM

All replies

  • User-939850651 posted

    Hi dolittle,

    IN my webforms application. Why on God's green earth would creating and returning a new XEelement work in selecting and stepping into GetResults() from a wizardstep in ascx control "PriorityWizardStep" but as soon as it's not a XEelement but a List of PriorityQuestionModel type it won't even step into GetPriorityResults() in that same control? All types and controls are found it's just the xelement somehwhere allows for stepping into.

    According to your description, I am afraid that I can not reproduce your problem. How do you define user control ( PriorityWizardStep )?

    And I don’t know how you define the PriorityQuestionModel class. Can you provide more sample code so that we can reproduce your question?

    Best regards,

    Xudong Peng

    Monday, February 1, 2021 7:12 AM