asp.net中的string.Format()

代码
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/p/1770011.html