Click here to Skip to main content
16,006,065 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
<asp:HyperLink ID="Log_Out" OnLoad="GoToLoginPage();" runat="server">[Log Out]
Posted

Hi Pramod_007, you're using a server control, so you must call to a server event there:
ASP.NET
<asp:hyperlink id="Log_Out" onload="GoToLoginPage" runat="server" xmlns:asp="#unknown">
</asp:hyperlink>

So, in your code behind (C#, in this case) you will have something like this:
C#
private void GoToLoginPage(object sender, EventArgs e)
{
    //Redirect to your desired page
}

Your question is so simple, but I think that is it that you looking for.

Hope it helps, any way.
 
Share this answer
 
Try <asp:hyperlink id="Log_Out" onload="return GoToLoginPage();" runat="server" xmlns:asp="#unknown">[Log Out] </asp:hyperlink>
 
Share this answer
 
<asp:hyperlink id="Log_Out" onload="GoToLoginPage();" runat="server" xmlns:asp="#unknown">[Log Out]

Modify as below

<asp:hyperlink id="Log_Out" onload="GoToLoginPage" runat="server">[Log Out]
 
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