创建注销功能 [英] create a logout funcionality

查看:80
本文介绍了创建注销功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用vs 2010开发一个网络应用。

而不是使用按钮从webapp注销这样做:

I am developing a web app in vs 2010.
instead of using a button to logout from the webapp doing like this:

protected void btn_logout_Click(object sender, EventArgs e)
      {
          Session["User"] = null;
          Response.Redirect("Index_Page.aspx");
      }





我只想使用简单的文字和超链接,但我不知道如何通过以下方式重定向到Index_page表格单击此文本并进行会话[User] = null。



在这种情况下该怎么办?



I want to use only a simple text and hyperlink but i dont know how to redirect to the Index_page form by clicking this text and making session["User"]=null.

What to do in this case?

推荐答案

Hi
更改您的代码,例如

Response.Redirect(Index_Page.aspx,false);
Hi Change your code like
Response.Redirect("Index_Page.aspx", false);


这篇关于创建注销功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆