asp.net中解决页面刷新后字体等变大的问题
protected void Page_Load(object sender, EventArgs e)
{
if (Request.Cookies["login"] != null)
{
this.Button1.Attributes.Add("onclick", "if(!confirm('确实要订购吗?')) return false;");
}
}
protected void Button1_Click(object sender, EventArgs e)
{
Response.Write("<script>alert('当前购物车中,没有商品');</script>");
return;
}
把上面的改为:
protected void Button1_Click(object sender, EventArgs e)
{
//Page.RegisterStartupScript("ServiceManHistoryButtonClick", "<script>alert('当前购物车中,没有商品');</script>");
//或下面都可,上面第一个参数随便起,不要重复.
Response.Write("<script>alert('当前购物车中,没有商品');</script>");
Response.Write(" <script>document.location=document.location; </script>");
相关文档:
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<div>
<asp:UpdatePanel ID="Updat ......
作者:敖士伟
在Fedora 12上的安装过程
一、mono安装
yum install gcc gcc-c++ bison pkgconfig glib2-devel gettext make libgdiplus Cairo
wget http://ftp.novell.com/pub/mono/sources/mono/mono-2.6.1.tar.bz2
tar jxvf mono-2.6.1.tar.bz2
cd mono-2.6.1
./configure --prefix=/usr
make
make install
安装 ......
新手,上网GOOGLE了半天,也没发现一个最简单的解决方案,各网站都是在抄来抄去。
刚刚配置了一台新的asp.net的网站,写一下方式,给自己做个总结。
1.安装iis 6.0,就用windows 2003 自带光盘就可以。
2.打开iis, 选择网站->新建-> 网站,然后选择目录啊,起名啊什么的,很正常的步骤。注意把脚本资源那个给选中
......
using System.Text.RegularExpressions; //引入的命名空间
以下为引用的内容:
//清除HTML函数
public static string NoHTML(string Htmlstring)
{
//删除脚本
Htmlstr ......
此处提供的代码用来实现当asp.net页面中的某个Button被点击后disable掉该页面中所有的Button,从而防止提交延时导致的多次提交。基于之前的onceclickbutton脚本.
//ASP.NET中防止页面多次提交的代码:javascript< script language="javascript"> < !-- function disableOtherSubmit()
{
var obj ......