推薦:asp.net CheckBoxList各項最小寬度CSS樣式(兼容性good)ASP.NET中,CheckBoxList里的選擇都是自動寬度的,屬性時沒有設置各項寬度的設置,在IE10、遨游4極速模式及兼容模式下均可正確顯示最小寬度,此樣式除了用于CheckBoxList外,也可用于DIV等
復制代碼 代碼如下:www.CuoXIn.com
/// <summary>
/// iframe 中,彈出信息并跳轉
/// </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);
}
頁面調用 cs文件
復制代碼 代碼如下:www.CuoXIn.com
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 url重寫的好處與方法asp.net url重寫的好處與方法,需要的朋友可以參考一下