MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

LoginSocial.ascx restricting to Facebook only  (Mono Support )

Viewed 5331 time(s), 4 post(s) 4/24/2013 5:55:18 AMby mrudul
mrudul

mrudul

4/24/2013 5:55:18 AM
I am in the process of developing a website application, where I want to restrict social login to facebook only.  What is the best way to do it.
This content has not been rated yet. 
103 Reputation 12 Total posts
mrudul

mrudul

4/24/2013 6:50:12 AM
I think i found a way to do this.  I will share it with the group and let me know if it is not the correct way to do it.

Create a control which extends  MonoSoftware.MonoX.ModuleGallery.LoginSocial and in the ascx part of the file, only include the facebook part of the html.  comment the rest of the html part  like below


        <div class="social-button-holder">
            <asp:LinkButton ID="btnFacebook" runat="server" CausesValidation="false" OnClick="btn_Click" class="facebook" CommandArgument="FACEBOOK">
                <img src="<%= ResolveUrl(MonoSoftware.MonoX.Paths.App_Themes.img.Sn.facebook_login_png) %>" alt="<%= DefaultResources.LoginSocial_LoginWithFacebook %>" />
                <span><%= DefaultResources.LoginSocial_LoginWithFacebook %></span>
            </asp:LinkButton>
        </div>
This content has not been rated yet. 
103 Reputation 12 Total posts
iruzak

iruzak

4/25/2013 12:46:07 PM
Hi Mrudul,

extending MonoX LoginSocial control is fine, but you shouldn't delete buttons you don't want to use, instead put placeholder around them and set visibility to false.
This content has not been rated yet. 
443 Reputation 50 Total posts
mrudul

mrudul

4/30/2013 12:13:51 AM
Thanks.
This content has not been rated yet. 
103 Reputation 12 Total posts