Modality with Masterpage?

4 posts, 0 answers
  1. Jerry
    Jerry avatar
    12 posts
    Member since:
    May 2009

    Posted 29 Jun 2009 Link to this post

    Hi All,

    I am trying to implemenent login function following the Tooltip/server side properties/Modality demo example. 

    The probelm is that it is not working when I use masterpage. either put the everything in the masterpage or put in the content page, nothing will happen when click the button to show the login form.

    Please help

    TIA 

    Jerry
     
  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 02 Jul 2009 Link to this post

    Hi Jerry,

    The reason for this problem is that in the JavaScript, the ID of the button is hardcoded ("Button2"). If you are using this code in a masterpage, you need to use the ClientID of the control -
    if (args.get_postBackElement().id == "<%= Button2.ClientID%>")

    For your convenience I attached a modified version of the code to this thread - please check it and use it as a base in your scenario.

    Best wishes,
    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Fraser
    Fraser avatar
    5 posts
    Member since:
    Sep 2011

    Posted 02 Nov 2011 Link to this post

    Hi - I've tested your example with the latest version of the controls, and I'm getting a javascript error saying it can't find the function "OnClientBeforeHide".

    Any ideas?

    Fraser
  5. Fraser
    Fraser avatar
    5 posts
    Member since:
    Sep 2011

    Posted 02 Nov 2011 Link to this post

    Hi - Got this to work, using the example on the main website, and <%= Button1.ClientID%> rather than the javascript provided in the modified example.

    Thanks,
    Fraser
Back to Top