Click here to Skip to main content
15,888,401 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My question is that..ke when i going to logout my website from user module the validation error is occurred ..even after the log out session is written on master page...plz help me...
Posted
Comments
Chinmaya C 20-Mar-13 5:07am    
Could you please elaborate your question ?
Question is not so clear...
Steve44 20-Mar-13 5:10am    
A few more details about what your website is doing when the error occurs would be helpful in pinpointing the issue.
Thanks!

1 solution

Quote:
when i going to logout my website from user module the validation error is occurred

To solve this problem, set CuasesValidation="false" to your Log Out LinkButton.
Try this:
HTML:
ASP.NET
<asp:linkbutton id="btnLogOut" runat="server" causesvalidation="false" text="Log Out" onclick="btnLogOut_Click" xmlns:asp="#unknown" />

Code Behind:
C#
protected void LinkButton_Click(object sender, EventArgs e) 
{
    Session.Abandon();
    Response.Redirect("Login.aspx");
}

Quote:
after the log out session is written on master page.

This part of your question I din't understand. After clearing the session like the above example, you wont get the error like this.


--Amit
 
Share this answer
 
Comments
Raj@88 20-Mar-13 5:32am    
hey...amit its working...bt page redirect nahi ho ra hain ..
_Amy 20-Mar-13 5:34am    
What kind of error you are getting?
Raj@88 20-Mar-13 5:36am    
no error...only page refresh ho raha hain
_Amy 20-Mar-13 5:39am    
Try this:
Response.Redirect("~/Login.aspx");

--Amit
Raj@88 20-Mar-13 5:41am    
Mr. amit...problem solved...

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