亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

asp.net在iframe中彈出信息并執(zhí)行跳轉(zhuǎn)問(wèn)題探討

 更新時(shí)間:2013年04月21日 17:49:36   作者:  
本代碼將實(shí)現(xiàn)在iframe中彈出信息并執(zhí)行跳轉(zhuǎn),感興趣的朋友可以參考下
復(fù)制代碼 代碼如下:

/// <summary>
/// iframe 中,彈出信息并跳轉(zhuǎn)
/// </summary>
/// <param name="msg"></param>
/// <param name="targetPageName"></param>
public static void ResponseShowMsg(string msg, string targetPageName)
{
string str = "<script> alert('{0}'); window.parent.frames[\"sysMain\"].location.href = '{1}'; </script>";
string Urls = HttpContext.Current.Request.Url.OriginalString;
if (Urls.LastIndexOf('?') > 0)
{
Urls = Urls.Substring(0, Urls.LastIndexOf('?')).Replace(HttpContext.Current.Request.Url.Segments[HttpContext.Current.Request.Url.Segments.Length - 1], targetPageName);
}
else
{
Urls = Urls.Replace(HttpContext.Current.Request.Url.Segments[HttpContext.Current.Request.Url.Segments.Length - 1], targetPageName);
}
str = string.Format(str, msg, Urls);
HttpContext.Current.Response.Write(str);
}

頁(yè)面調(diào)用 cs文件
復(fù)制代碼 代碼如下:

protected void btnSave_Click(object sender, EventArgs e)
{
if (bll.RoleAdd(model, tempMs))
{
CmvspCommon.MessageBox.ResponseShowMsg( "保存成功!", "add.aspx");
}
else {
CmvspCommon.MessageBox.Show(this, "保存失?。?);
}
}

相關(guān)文章

最新評(píng)論