温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:最简单,最适合入门学习的三层架构例子
当前文件:
MVCTest/Utility/showmessage.cs,打开代码结构图
MVCTest/Utility/showmessage.cs,打开代码结构图1using System; 2
using System.Collections.Generic; 3
using System.Linq; 4
using System.Text; 5
using System.Web; 6
7
namespace Utility 8
{ 9
public class showmessage 10
{ 11
public void ShowRedirect(string str, string url) 12
{ 13
StringBuilder sb = new StringBuilder(); 14
sb.Append("<script language=\"javascript\"> \n"); 15
sb.Append("alert(\"" + str.Trim() + "\"); \n"); 16
sb.Append("window.location.href=\"" + url.Trim() + "\";\n"); 17
sb.Append("</script>"); 18
System.Web.HttpContext.Current.Response.Write(sb.ToString()); 19
} 20
} 21
} 22





}
}