主頁 > 知識庫 > asp.net在iframe中彈出信息并執(zhí)行跳轉(zhuǎn)問題探討

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

熱門標(biāo)簽:Linux服務(wù)器 服務(wù)器配置 Mysql連接數(shù)設(shè)置 團(tuán)購網(wǎng)站 科大訊飛語音識別系統(tǒng) 電子圍欄 阿里云 銀行業(yè)務(wù)
復(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);
}

頁面調(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, "保存失??!");
}
}
您可能感興趣的文章:
  • asp.net中MVC借助Iframe實現(xiàn)無刷新上傳文件實例
  • ASP.NET頁面借助IFrame提交表單數(shù)據(jù)所遇到問題的解決方法分享
  • asp.net 文件上傳與刷新與asp.net頁面與iframe之間的數(shù)據(jù)傳輸
  • ASP.NET中使用IFRAME建立類Modal窗口
  • asp.net省市三級聯(lián)動的DropDownList+Ajax的三種框架(aspnet/Jquery/ExtJs)示例
  • asp.net 學(xué)習(xí)之路 項目整體框架簡單的搭建
  • asp.net GridView中超鏈接的使用(帶參數(shù))
  • ASP.NET 鏈接 Access 數(shù)據(jù)庫路徑問題最終解決方案
  • asp.net實現(xiàn)生成靜態(tài)頁并添加鏈接的方法
  • ASP.NET中iframe框架點擊左邊頁面鏈接 右邊顯示鏈接頁面內(nèi)容

標(biāo)簽:蚌埠 萍鄉(xiāng) 衡水 廣元 江蘇 大理 棗莊 衢州

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《asp.net在iframe中彈出信息并執(zhí)行跳轉(zhuǎn)問題探討》,本文關(guān)鍵詞  ;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 收縮
    • 微信客服
    • 微信二維碼
    • 電話咨詢

    • 400-1100-266