Copied to clipboard

Flag this post as spam?

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


  • Richard Thompson 100 posts 336 karma points
    Dec 10, 2014 @ 16:38
    Richard Thompson
    0

    WebForm_DoPostBackWithOptions is not defined submitting user control

    Hi,

    I've just installed Umbraco 7.2 and have created a user control which contains a login control i.e.:

    <asp:Login ID="Login1" runat="server" OnLoggingIn="Login1_LoggingIn" OnAuthenticate="Login1_Authenticate"></asp:Login>

    I've added a macro to the site and when I load the site the login form displays fine.  When I submit the login form I receive the following error:

    Uncaught ReferenceError: WebForm_DoPostBackWithOptions is not defined

    I have this problem from Chrome, IE11 and Firefox.

    Google has hundreds of results with issues in .Net 4 but the site is a .Net 4.5 site running in IIS Express on Windows 8.1.

    Does anybody know a fix for this?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Dec 10, 2014 @ 17:14
    Jan Skovgaard
    0

    Hi Richard

    Unless you have changed the template engine to be running Webforms it will be using MVC out of the box since the release of Umbraco 7.

    So have you changed it to Webforms in the /config/umbracoSettings.config?

    /Jan

  • Richard Thompson 100 posts 336 karma points
    Dec 10, 2014 @ 17:40
    Richard Thompson
    0

    Thanks.  I hadn't, too used to MVC these days.

    I've corrected the config but unfortunately I'm still getting the same error on submission.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Dec 10, 2014 @ 17:55
    Jan Skovgaard
    0

    Hi Richard

    But if you're using MVC on other projects are there then any particular reason why you want to use webforms on this one? Would it be possible to achieve what you need using MVC in Umbraco instead?

    Not sure I know what the issue in the webform could be then - Do you have some underlying code that could be shared?

    /Jan

  • Richard Thompson 100 posts 336 karma points
    Dec 10, 2014 @ 18:09
    Richard Thompson
    0

    Hi Jan,

    I was thinking I might be better trying MVC.  I was just trying to put a quick demo together to test whether it would be possible to integrate Umbraco members with our Active Directory so was just quickly trying the code from the following post:

    http://our.umbraco.org/wiki/how-tos/membership-providers/use-active-directory-to-authenticate-site-members-(intranet)

    I used the code from that post to create my user control, created a macro called login and selected my user control.  My view file is:

    @inherits Umbraco.Web.Mvc.UmbracoTemplatePage
    @{
        Layout = null;
    }
    @Umbraco.RenderMacro("Login")

    I'll just try this in MVC instead.

    Thanks for the help.

Please Sign in or register to post replies

Write your reply to:

Draft