Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Lars 66 posts 136 karma points
    Mar 13, 2015 @ 14:07
    Lars
    0

    User controls are not working

    Hi. I have some old User controls used in Umbraco 4. When I render my webforms in Umbraco 7.2.2 they are not working. I have already changed the settings from Mvc to WebForms following the advice at https://our.umbraco.org/forum/umbraco-7/using-umbraco-7/53018-custom-ascx-control-not-working-with-Umbraco-7.

    Suggestions, please :-)

    /Lars

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Mar 15, 2015 @ 08:46
    Jan Skovgaard
    0

    Hi Lars

    Are they just no rendering or is there an error thrown somewhere?

    Even though you have changed the template engine it won't help if you're relying on some old API code for v4...the underlying API's where upgraded in v6...so perhaps you nee to refactor some code in order for them to work if they're relying on the Umbraco API?

    Looking forward to hearing from you.

    /Jan

  • Lars 66 posts 136 karma points
    Mar 15, 2015 @ 20:17
    Lars
    0

    Hi Jan

    I AM relying on some old API code for v. 4. What you are telling me is that old User controls for v4 will not work at all on v6 and forwards. Is that true? That surprises me but it might save me for a lot of useless efforts!

    /Lars

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Mar 15, 2015 @ 20:24
    Jan Skovgaard
    0

    Hi Lars

    Ok...then there can perhaps be some issues. I'm not saying that it's not going to work at all. Just that some methods etc. might be obsolete (Should still work though) and perhaps some stuff does not work anymore or need to be modified a bit.

    Have you tried having a look in the trace log at /App_Data/Logs in order to see if that reveals anything useful?

    Could you share some of the code from the user control? Perhaps some of the c# wizards in here are able to point out if something needs to be done differently.

    /Jan

  • Lars 66 posts 136 karma points
    Mar 16, 2015 @ 16:18
    Lars
    0

    Hi Jan

    The solution was a lot more simple than the question. This is embarrassing: I forgot to put an attribute on the <form> tag, ie <form runat="server">

    Sorry for disturbing but thank you for your interesting answers anyway.

    /Lars

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Mar 16, 2015 @ 16:22
    Jan Skovgaard
    0

    Hi Lars

    Haha, good to hear it was a simple fix afterall - I should have thought of that :)

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft