注销按钮的编码....... [英] Coding of logout Button.......

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

问题描述

请告诉我登录页面的完整代码.....

Plz tell me full fleshed coding for login page.....

推荐答案

首先,它是ASP还是ASP.NET?第二,你的最后一个仆人是什么时候死的?第三,为什么您对我们的答案知之甚少?如果登录完全正确,则基于会话变量存储您的登录信息.但是我们怎么知道那个变量是什么呢?将其设置为null,如果您的代码不是灾难性的,则应注销用户.
Well, first of all, is it ASP, or ASP.NET ? Second, when did your last servant die ? Third, why do you know so little as to expect we can answer this ? Your login is stored based on a session variable, if it''s done right at all. But how can we know what that variable is ? Set it to null, and the user should be logged out, if your code is not a disaster.


希望
Hope this[^] might help you.

From your question we came to know that you are the beginner in coding. So better read some online books and then proceed further.


在设计任何网站时,使用会话非常重要. import .
这是代码:


Use of sessions is very import important while designing any website.

Here is the code:


protected void btnlogout_Click(object sender, ImageClickEventArgs e)

{


Session.Abandon();

Session.Contents.RemoveAll();

System.Web.Security.FormsAuthentication.SignOut();

Response.Redirect("../Login.aspx");



}




Javascript:




Javascript:

<script language=""javascript"" type=""text/javascript"><br" mode="hold" />history.forward();



</script>


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

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