Send e-mail when a link is clicked
Hi Ppl, I am using FBA and added a forgot password link button on login.aspx page. Now i want to send password to users through email when they clicked on link. Which approach shall i follow to achieve this task. Any suggestion?Cheers, Hemendra-MCTS
March 24th, 2010 7:42am

i have highlight the the custom code. When first time i run this script then i was getting result but when i refresh the page then getting unknown error. See what i will do. if javascript works fine here then i will use JS to sending email. <%@ Assembly Name="Microsoft.SharePoint.ApplicationPages, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%> <%@ Page Language="C#" Inherits="Microsoft.SharePoint.ApplicationPages.LoginPage" MasterPageFile="~/_layouts/simple.master"%> <%@ Import Namespace="Microsoft.SharePoint.ApplicationPages"%> <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%> <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%> <%@ Import Namespace="Microsoft.SharePoint"%> <script runat=”server”> protected override void OnLoad(EventArgs e) { Response.Write(“This is from the onload event”); base.OnLoad(e); } </script> <asp:Content ContentPlaceHolderId="PlaceHolderPageTitle" runat="server"> <SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,login_pagetitle%>" EncodeMethod='HtmlEncode'/> </asp:Content> <asp:Content ContentPlaceHolderId="PlaceHolderTitleBreadcrumb" runat="server"> &nbsp; </asp:Content> <asp:Content ContentPlaceHolderId="PlaceHolderPageTitleInTitleArea" runat="server"> <SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,login_pagetitle%>" EncodeMethod='HtmlEncode'/> </asp:Content> <asp:Content ContentPlaceHolderId="PlaceHolderSiteName" runat="server"/> <asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server"> <asp:login id="login" FailureText="<%$Resources:wss,login_pageFailureText%>" runat=server width="100%"> <layouttemplate> <asp:label id=FailureText class="ms-error" runat=server/> <table class="ms-input"> <COLGROUP> <COL width=25%> <COL WIDTH=75%> <tr> <td noWrap><SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,login_pageUserName%>" EncodeMethod='HtmlEncode'/></td> <td><asp:textbox id=UserName autocomplete="off" runat=server class="ms-long"/></td> </tr> <tr> <td noWrap><SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,login_pagePassword%>" EncodeMethod='HtmlEncode'/></td> <td><asp:textbox id=password TextMode=Password autocomplete="off" runat=server class="ms-long"/></td> </tr> <tr> <td colSpan=2 align=right><asp:button id=login commandname="Login" text="<%$Resources:wss,login_pagetitle%>" runat=server /></td> </tr> <tr> <td colSpan=2><asp:CheckBox id=RememberMe text="<%$SPHtmlEncodedResources:wss,login_pageRememberMe%>" runat=server /></td> </tr> <br> <tr><td> <asp:LinkButton ID=lnkbtnForgotpassword runat=server>Forgot Password</asp:LinkButton> </td> </tr> </table> </layouttemplate> </asp:login> </asp:Content>Cheers, Hemendra-MCTS
Free Windows Admin Tool Kit Click here and download it now
March 24th, 2010 11:09am

you can find your solution @ http://farhanfaiz.wordpress.com/2008/01/11/in-line-code-for-moss/ it's regarding MOSS programming for inline scripts in aspx sites, the recommanded way is always use code behind aspx pages when you are dealing with MOSS sites. for your stuff to make it workin.. modify your web.config file of portal which can be found @ C:\Inetpub\wwwroot\wss\VirtualDirectories\<protal ProtNo> add new entry as given below in the secion <PageParserPaths> <PageParserPath VirtualPath=”/*” CompilationMode=”Always” AllowServerSideScript=”true” IncludeSubFolders=”true” /> Regards, Vikas Patel.
March 24th, 2010 11:50am

Hi, As i mentioned above, am using FBA and added a forgot password hyperlink on login page. But thing is, when i click on forgot password link, my page is redirecting to login page. what may be the prob, any idea. <tr> <td colSpan=2><asp:HyperLink ID="hlPasswordRecovery" Text="Forgot your password?" runat="server" NavigateUrl="~/_layouts/FBA/Forgotpassword.aspx" /></script></td> </tr> Cheers, Hemendra-MCTS
Free Windows Admin Tool Kit Click here and download it now
April 13th, 2010 1:19pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics