随笔分类 -  ASP.NET

 
ASP.NET控件的下拉列表属性出错
摘要:最近在学习写控件,从最简单的日期选择器开始。共有如下几个属性:Minyear:最小年份Maxyear:最大年份Theme:样式代码如下:[代码]不设置属性的时候,也就是默认属性的时候正常:<Fting:calendar ID="Calendar1" runat="server"></Fting:calendar>可是选择属性后<Fting:calendar ID="C... 阅读全文
posted @ 2008-10-13 21:07 不惊了 阅读(519) 评论(1) 推荐(0)
获取某文件夹下的目录
摘要:DirectoryInfodirinfo=newDirectoryInfo(Server.MapPath("upload"));FileSystemInfo[]dirs=dirinfo.GetFileSystemInfos();if(dirs.Length>1){DropDownList1.DataSource=dirs;DropDownList1.DataBind();} 阅读全文
posted @ 2007-12-17 20:55 不惊了 阅读(257) 评论(0) 推荐(0)
真正的简转繁
摘要:usingSystem;usingSystem.Data;usingSystem.Configuration;usingSystem.Collections;usingSystem.Web;usingSystem.Web.Security;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;usingSystem.Web.UI.WebControls... 阅读全文
posted @ 2007-06-09 10:18 不惊了 阅读(641) 评论(1) 推荐(0)
DropDownList绑定数据源后,如何设置选中项
摘要:DropDownList在绑定数据源控件后,该如何设置选中项呢我按以下方法未能实现,我的代码如下:<asp:DropDownListID="DropDownList1"runat="server"AutoPostBack="True"DataSourceID="SqlDataSource1"DataTextField="subject"DataValueField="id"OnSelecte... 阅读全文
posted @ 2007-05-06 10:38 不惊了 阅读(4265) 评论(5) 推荐(0)
"回发或回调参数无效"的错误,何解
摘要:初学.NET2.0,在做例子的时候,处理提交新评论的时候报"回发或回调参数无效",经过调式我发现是侧边栏的原因这个侧边栏就是什么最新文章,最新评论啊什么的,我全部放在自定义控件里的,然后在控件里将数据绑定到Repeater上,但在内容页提交评论时会报"回发或回调参数无效"的错误,何解在网上搜索过,但都说是下拉列表和AJAX的问题,但我现在的情况不在这两种之内寻找原因中... 阅读全文
posted @ 2007-01-24 11:05 不惊了 阅读(612) 评论(0) 推荐(0)