loadin Do…
一条只能往前走的路,叫时光.
首页
联系
订阅
管理
3 Posts :: 155 Stories :: 78 Comments :: 0 Trackbacks
公告
昵称:
i'am sl
园龄:
5年2个月
粉丝:
1
关注:
0
搜索
随笔分类
(3)
个人笔记(3)
文章分类
(154)
.NET*开发(13)
As3(17)
Design*设计(1)
flash cs3 professional(as 3.0)(31)
Music&Video*娱乐(10)
News*动态(1)
Other*其他(5)
Private*私人(40)
System*系统(6)
WEB*设计(30)
最新评论
ASP.NET中常用的代码
1. 打开新的窗口并传送参数:
Title
传送参数:
response.write("<script>window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)</script>")
接收参数:
string a = Request.QueryString("id");
string b = Request.QueryString("id1");
2.为按钮添加对话框
Title
Button1.Attributes.Add("onclick","return confirm(’确认?’)");
button.attributes.add("onclick","if(confirm(’are you sure...?’)){return true;}else{return false;}")
3.表格点击改变颜色
Title
if (e.Item.ItemType == ListItemType.Item e.Item.ItemType == ListItemType.AlternatingItem)
{
e.Item.Attributes.Add("onclick","this.style.backgroundColor=’#99cc00’;
this.style.color=’buttontext’;this.style.cursor=’default’;");
}
4.获取错误信息并到指定页面
Title
不要使用Response.Redirect,而应该使用Server.Transfer
e.g
// in global.asax
protected void Application_Error(Object sender, EventArgs e) {
if (Server.GetLastError() is HttpUnhandledException)
Server.Transfer("MyErrorPage.aspx");
//其余的非HttpUnhandledException异常交给ASP.NET自己处理就okay了 :)
}
5.Panel 横向滚动,纵向自动扩展
<asp:panel style="overflow-x:scroll;overflow-y:auto;"></asp:panel>
绿色通道:
好文要顶
关注我
收藏该文
与我联系
posted on 2006-12-13 22:41
i'am sl
阅读(22)
评论(0)
编辑
收藏
注册用户登录后才能发表评论,请
登录
或
注册
,
返回博客园首页
。
首页
博问
闪存
新闻
园子
招聘
知识库
最新IT新闻
:
·
联发科宣布Android手机新平台
·
惠普在华PC份额跌至第五 华硕跻身前四
·
IT大鳄纷纷争夺企业级市场蛋糕 或成为下一个拼抢高地
·
为爱编程,IT人的情人节
·
诺基亚传向台湾厂商订购2.5G,2.75G芯片
»
更多新闻...
最新知识库文章
:
·
十年程序员
·
HTTP 协议详解
·
像设计Web程序那样设计建筑
·
向Google学习打造灵动的web体验
·
高级编程语言的发展历程
»
更多知识库文章...
China-pub 2011秋季教材巡展
China-Pub 计算机绝版图书按需印刷服务
Powered by:
博客园
Copyright © i'am sl