zoukankan
html css js c++ java
2007.9.17
<
asp:Button
ID
="Button1"
Text
="取消"
CssClass
="btn"
OnClientClick
="javascript:window.location.reload();"
runat
="server"
/>
<!--
window.location.reload();window.close();
-->
Response.Write(
"
<script>alert('已成功修改密码,请记住新密码!\\n用户名:
"
+
txt_user_login.Text.Trim().Replace(
"
'
"
,
"
''
"
)
+
"
\\n 密码:
"
+
txt_confirm_new_pass.Text.Trim()
+
"
');window.location.href='login.aspx';</script>
"
);
//
如果是最后一句,则其后不用return ||||| Response.Redirect()是在server端执行的动作,而Alert()是client端的动作,所以即使alert()在responser.redirect()之前也是没有用的
//
Response.Redirect("login.aspx");
//
Response.Redirect("index.aspx") 之后,Http 服务器回答客户端 302 Object Moved(可能吧),然后客户端直接访问新的网址了,显然根本就没有收到 redirect 之前的内容,用 ieHttpHeaders 看一下
comm_update.StatementCompleted
+=
new
StatementCompletedEventHandler(comm_update_StatementCompleted);
//
在下面这句comm_update.ExecuteNonQuery(); 之后执行该“事件”!
comm_update.ExecuteNonQuery();
void
comm_update_StatementCompleted(
object
sender, StatementCompletedEventArgs e)
{
//
throw new Exception("The method or operation is not implemented.");
Response.Write(
"
<script>alert('已成功修改密码,请记住新密码!\\n用户名:
"
+
str_user_login
+
"
\\n 密码:
"
+
txt_confirm_new_pass.Text.Trim()
+
"
');</script>
"
);
return
;
}
<
script type
=
"
text/javascript
"
language
=
"
javascript
"
>
function
getCurrentPage()
{
thisURL
=
document.URL;
alert(thisURL);
//
完整路径:http://localhost:7933/wltbs/pd_user_changepass.aspx
thisPage
=
thisURL.substring( thisURL.lastIndexOf(
"
/
"
) );
//
从最后一个/(包括)取到最后
alert(thisPage);
return
thisPage;
}
function
popPage(page,url)
{
thisPage
=
getCurrentPage();
if
(thisPage
==
"
/
"
)
{
thisPage
=
"
/index.asp
"
;
}
if
( thisPage
==
page )
{
window.open(url);
}
}
function
l(boardid)
{
return
(getCurrentPage()
==
"
/list.asp?boardid=
"
+
boardid)
?
true
:
false
;
}
if
( l(
1
)
||
l(
3
)
||
l(
6
)
||
l(
7
) )
{
popPage( getCurrentPage(),
"
URL
"
) ;
}
</
script
>
<
body style
=
"
margin-top:0px; margin-left:0px; margin-right:0px;
"
class
=
"
body_bj
"
onload
=
"
return getCurrentPage();
"
>
function
show_cal()
//
left
{
if
(document.all(
"
pnl_cal
"
).style.visibility
==
"
visible
"
)
//
== 不是 =
{
document.all(
"
pnl_cal
"
).style.visibility
=
"
hidden
"
;
}
else
{
document.all(
"
pnl_cal
"
).style.visibility
=
"
visible
"
;
//
在后台visible=false了,前台就再也不可能显示它了
}
}
//
//
ddlBankName.SelectedItem.Text = "";
//
body 的①onload 事件函数 和 ②ddlPayMode's onchange()已经将ddlBankName -->disabled 所以这里的赋值是不能成功的.
//
Type t = sdr["flag_nuse"].GetType();
b
=
(Boolean)sdr[
"
flag_nuse
"
];
SqlCommand comm
=
new
SqlCommand();
//
sdr对应字段有两个值,必定一个为null
comm.Connection
=
conn;
//
SqlParameter sp_fee = new SqlParameter("@id", SqlDbType.NVarChar, 50);
//
只是new一个新的SqlParameter并没有把它加到当前的comm上
//
sp_fee.Value = arr_fee_id_load[i];
comm.Parameters.Clear();
//
清除以前的Parameters集合
comm.Parameters.Add(
"
@id
"
, SqlDbType.NVarChar,
50
);
//
添加到当前的SqlParameters集合上
comm.Parameters[
"
@id
"
].Value
=
arr_fee_id_load[i];
//
给正在使用的SqlParameter赋值
comm.CommandText
=
"
select_from_fee
"
;
comm.CommandType
=
CommandType.StoredProcedure;
在pd_user_changepass.aspx页面内:
Page.LoadComplete
+=
new
EventHandler(Page_LoadComplete);
void
Page_LoadComplete(
object
sender, EventArgs e)
{
//
throw new Exception("The method or operation is not implemented.");
Response.Redirect(
"
pd_user_changepass.aspx
"
);
//
死循环
}
/**/
///
<summary>
///
保存修改后的User_Login的值 属性
///
</summary>
public
string
str_user_login
{
get
{
if
(ViewState[
"
str_user_login
"
]
==
null
)
return
""
;
else
return
ViewState[
"
str_user_login
"
].ToString();
}
set
{
ViewState[
"
str_user_login
"
]
=
value.ToString();
}
}
/**/
/*
*****************************************************************************************
*/
if
(str_user_login
==
""
)
//
str_user_login属性一直保持“用户名”不存在的那“次”输入的值
{
str_user_login
=
txt_user_login.Text.Trim().Replace(
"
'
"
,
"
''
"
);
//
保存修改后的TextBox:txt_user_login的值
}
查看全文
相关阅读:
127.0.0.1
【转】linux查看及修改文件权限以及相关
【转】为什么要进行傅立叶变换?傅立叶变换究竟有何意义?如何用Matlab实现快速傅立叶变换?
ADO.NET类库与SQL相关的知识梳理
【转】应用软件系统架构设计的“七种武器”
CPoint、CSize、CRect类
【转】关于int、float、double一些知识的整理
C# 实现屏幕键盘
如何在C#中读写INI文件
TreeView复选框选择逻辑判断
原文地址:https://www.cnblogs.com/simhare/p/896227.html
最新文章
(1)箭头样式
FastReport 的安装 心得
SQL 不使用递归,而对地区等级进行扁历
Microsoft Windows Server 2003中文企业版(25客户端) 25客户端含义
一个奇怪的DLL调用问题
Update affected more than 1 record
DataSet>TField
SQL Server 中的跨库视图
ClientDataSet 动态创建 计算字段 Field
DBGridEh 自动下一行的问题
热门文章
如何在控制面板中隐藏任务计划
四年
网摘杜书伍: 从“大酱”到“大将”台湾联强国际总裁兼CEO
网摘从校对工到外企总裁 金领晒成功秘诀
网摘自我管理八大原则
两年前后
网摘HP大中华区总裁孙振耀退休感言
业·结
网摘(尹珊珊)get tough行为指南
网摘IT学习力
Copyright © 2011-2022 走看看