代码
string
message
=
"
Alert!
"
;
string
toURL
=
"
home.aspx
"
;
string
js
=
@"
<script>alert('{0}'); window.location.href = '{1}'; </script>
"
;
if
(
!
Page.ClientScript.IsStartupScriptRegistered(
"
alert
"
)){ Page.ClientScript.RegisterStartupScript(Page.GetType(),
"
alert
"
,
string
.Format(js, message, toURL));}
转载于:https://www.cnblogs.com/lfzwenzhu/archive/2010/07/02/1770011.html
转载请注明原文地址: https://win8.8miu.com/read-1558914.html