I want to create forum application like asp.net forums. when user posts after login. when anonymous person sees the post and if he wants to reply
he will clck reply button. At that time he should register or he should login.
here i want how when he click reply how we can check he is authenticated or not.
please help me
thanq.
Prabhu RajaPosted Sep 9, 2011, 7:23 AM
We can do this by several ways . for example using Session Variables.I have no knowledge about Session Variable.
I gave a solutions, hope it will help you. If we click a reply button, I think a simple if condition statement will do this.
string returnUrl = Request.QueryString["Username"];
// check Username not null, then consider the user registered
//check Username null, then consider the user not registered
if (returnUrl == null)
{
returnUrl = "~/RegisterUser.aspx";
}
else
{
Response.Redirect("~/Reply.aspx";
}
-----------------------------------------
If it helps you, then mark as "Correct Answer"
Satish BhatPosted Sep 9, 2011, 5:40 AM