Copied to clipboard

Flag this post as spam?

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


  • Brad 94 posts 151 karma points
    Jul 18, 2013 @ 08:04
    Brad
    0

    Buttons have stopped working

    This one me stumped. 

    I have a project set up in Visual Studio where I create user controls. When I compile that project the user controls and dlls etc are copied to the Umbraco project. This all works well and it not the problem now. 

    In these usercontrols i have built things like registration forms and authentication page etc. 

    Once they are in the Umbraco project I can go to the Developer/Marco area and create a new Macro. Here is one I have created for a test usercontrol I have created. 

    The code in that user control looks like this.. (truncated for brevity)

    and the code behind has this method in it. 

    ASP.NET 101. 

    So I put this usercontrol into a macro and add that macro to a page. 

    When I run this page the button appears as expected above the bodyText. However clicking the button does not work. The Screen flashs as if it is reloading, but nothing is displayed on the page. 

    Further more the code behind is not even called. 

    This is a an issue as ALL of my usercontrol buttons on the site have stopped working. And I Have no idea why. 

    I took the source code from the test page and examined it. I checked each <div> to see that it was closed corrrectly and if it was I remove that div. I checked the formatting of the page and it was clean. But the buttons are not longer working. They were a few days ago. 

    What would cause this type of behaviour?

     

     

     

     

     

     

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Jul 18, 2013 @ 12:10
    Jeroen Breuer
    0

    Do you have a <form runat="server"> around your usercontrols?

    Jeroen

  • Alex Skrypnyk 6133 posts 23952 karma points MVP 7x admin c-trib
    Jul 18, 2013 @ 14:27
    Alex Skrypnyk
    0

    Do you have EnableViewState in your usercontrol, page, site ? 

    Alex

  • Brad 94 posts 151 karma points
    Jul 19, 2013 @ 00:58
    Brad
    0

    I tried adding a <form runat="server"> tag around the usercontrols code.

    That got me an error that I can only have one <form  tag on my page. The template this usercontrol is getting loaded into has that tags already, and the user control is loaded within it. 

    What is odd here is that these controls were working on anohter Umbraco site.  This tells me that the problem is in my template elsewhere. 

    Guess I'll have to start pulling the template apart to find what is causing this issue. 

  • Alex Skrypnyk 6133 posts 23952 karma points MVP 7x admin c-trib
    Jul 19, 2013 @ 10:47
    Alex Skrypnyk
    0

    You should have <form runat="server"> tag inside your body )


Please Sign in or register to post replies

Write your reply to:

Draft