Click here to Skip to main content
15,886,035 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi,
i want create a login button for my site with google account.how to retrive the gmail data to my site.if user will login with gmail account to my site. if you know to retrive the data from gmail to my site.

we can develop the that application in .net2.0 or not

if you know the information please share for me.





thanks in advance.
Posted

Yes you can refer google API, you can either do it with C# libraries or Javascript.

Reference: http://code.google.com/apis/accounts/docs/AuthForWebApps.html
 
Share this answer
 
v2
Comments
penigandlakoti 9-Dec-11 0:18am    
i downloaded some files files from google api. it didnot support to the .net2.0 version.if you any code for google login .please share for me
You can try this code in your WebSite :
ASP.NET
<![CDATA[<%@ Page Language="VB" %>]]> 
 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head runat="server"> 
    <title></title> 
    <script type="text/javascript"> 
        function openForm() 
             { 
                  window.open("https://accounts.google.com/ServiceLogin?service=mail&passive=true&rm=false&continue=https://mail.google.com/mail/&ss=1&scc=1<mpl=default<mplcache=2&hl=en"); 
             } 
    </script> 
</head> 
<body> 
    <form id="form1" runat="server"> 
    <div> 
        <asp:button id="Button1" runat="server" text="Google Login" onclientclick="openForm();" xmlns:asp="#unknown" /> 
    </div> 
    </form> 
</body> 
</html>

I hope it will help you. :) --MKB
 
Share this answer
 
Comments
penigandlakoti 9-Dec-11 4:57am    
hi manoj,
i want user login with user email and his password, after one popup will be disply to the user that is allow or nothanks.user login with his email, he will user my site. that i asking for google login button.
any how thanks to you for your answer.
Member 9550455 22-Nov-12 1:40am    
its good answer. in this ahead,i want that after login to gmail account,logger should redirect to aspx page..
Hi,

you can use dotnetopenauth.dll to login with google. i have found one example here.

http://blogfornet.com/2013/11/how-to-login-with-google-in-your-site/

Hope it will help you.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900