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的值
}
查看全文
相关阅读:
套接字I/O模型-WSAAsyncSelect
套接字I/O模型-完成端口IOCP
套接字I/O模型-WSAEventSelect(转载)
Win7+VS2010环境下CEGUI 0.8.4编译过程详解
数组去重统计排序
计算当前月有几天
前端开发仓库
Jquery中bind(), live(), on(), delegate()四种注册事件的优缺点,建议使用on()
图表那些事
图标字体,矢量图标
原文地址:https://www.cnblogs.com/simhare/p/896227.html
最新文章
BZOJ 4103 [Thusc 2015]异或运算 (可持久化01Trie+二分)
BZOJ 3689 异或之 (可持久化01Trie+堆)
BZOJ 3166 [HEOI2013]Alo (可持久化01Trie+链表)
BZOJ 3261 最大异或和 (可持久化01Trie)
luogu P5305 [GXOI/GZOI2019]旧词
luogu P5304 [GXOI/GZOI2019]旅行者
luogu P5303 [GXOI/GZOI2019]逼死强迫症
luogu P5302 [GXOI/GZOI2019]特技飞行
luogu P5301 [GXOI/GZOI2019]宝牌一大堆
luogu P5300 [GXOI/GZOI2019]与或和
热门文章
luogu P5279 [ZJOI2019]麻将
luogu P5280 [ZJOI2019]线段树
luogu P5291 [十二省联考2019]希望
luogu P5290 [十二省联考2019]春节十二响
VC++多线程编程
多播_1
广播
套接字I/O模型-select
将套接字设置为非阻塞状态
套接字I/O模型-重叠I/O
Copyright © 2011-2022 走看看