Min.Dom

专注C#

常用链接

统计

Other Link

最新评论

2006年11月22日 #

Page.LoadTemplate的使用

最近为了在web页面上通过代码动态的显示一个列表(DataList),由于显示的item项比较复杂,所以使用了
load模版的方法,新建一个usercontrol页面(.ascx),按平时模版列的做法,
在其html中加入<%# DataBinder.Eval(Container.DataItem, "displayname") %>,结果执行的时候
出现异常:“System.Web.UI.Control”并不包含对“DataItem”的定义
看来加载模版和平时直接写在页面上还是有区别的,google了一下,发现有用VB写的,将Container转换成
DataListItem,于是将上面的脚本改成<%# DataBinder.Eval(((DataListItem)Container).DataItem, "displayname") %>
就没问题了。

posted @ 2006-11-22 10:13 min 阅读(251) | 评论 (0)编辑

2005年7月10日 #

公司竟然禁止访问此网站

着实让人有些不爽,几次提交希望免费开通,竟然被拒绝!

posted @ 2005-07-10 10:21 min 阅读(574) | 评论 (5)编辑

2004年12月16日 #

javascript 中的replace方法

第一次发现javascript中replace() 方法如果直接用str.replace("-","!") 只会替换第一个匹配的字符.

replace()
The replace() method returns the string that results when you replace text matching its first argument
   (a regular expression) 
with the text of the second argument (a string). 
   If the g (global) flag is not set 
in the regular expression declaration, this method replaces only the first 
   occurrence of the pattern. For example,

var s = "Hello. Regexps are fun.";s = s.replace(/\./"!"); // replace first period with an exclamation pointalert(s);

produces the string “Hello
! Regexps are fun.” Including the g flag will cause the interpreter to
   perform a global replace, finding and replacing every matching substring. For example,

var s = "Hello. Regexps are fun.";s = s.replace(/\./g, "!"); // replace all periods with exclamation pointsalert(s);

yields 
this result: “Hello! Regexps are fun!

posted @ 2004-12-16 16:20 min 阅读(11234) | 评论 (8)编辑

2004年11月2日 #

media play10

刚把我的media play升级到media play10,觉得比以前的版本都好使,
以前总觉得媒体库不好用,现在感觉好多了。增加了个在线商店功能。

microsoft的界面总是看的那么爽。可惜的是只能在windows xp下运行。

有个splat模式看着比较爽,其小视图的效果如下:

posted @ 2004-11-02 14:46 min 阅读(14858) | 评论 (20)编辑

2004年10月14日 #

制作windows service的安装程序

这段时间一直在写windows service,每次写完调试都是在控制台输入命令进行安装/启动/卸载,
虽然工作量不大,但时间长了也觉得麻烦。于是用.net做了个windows service的安装。

首先在解决方案中创建一个安装部署的项目,右键点击项目名称,在菜单中选择[添加]-->[项目输出],
在弹出的"添加项目输出组"窗口中,第一个下拉框会列出该解决方案中其他的项目,
选择需要制作安装的windows service项目,再选择主输出,点[确定]。如图:

本以为这样就可以的,但是安装完后,windows service并没有安装成服务。
还必须在安装项目中添加自定义操作。右击安装项目->视图->自定义操作.
如下图:分别添加自定义操作,在应用程序文件夹中选择刚才添加的主输出即可.

posted @ 2004-10-14 11:02 min 阅读(5523) | 评论 (12)编辑

2004年7月2日 #

Session state cannot be used in ASP.NET with Windows SharePoint Services


Add the following directives in the Web.config file of the Web application between the <system.web> tag and the </system.web> tag:

<!-- 
Clear out the WSS ASP.NET handler and specify the default ASP.NET handler for all pages. 
-->

<httpHandlers>
<clear />
<add verb="*" path="*.aspx" type="System.Web.UI.PageHandlerFactory, System.Web, 
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
 />
</httpHandlers>

<!-- 
Set the trust to Full. WSS configures a very restrictive trust policy that does not 
allow ASP.NET Web application to run correctly.
-->

<trust level="Full" originUrl="" />

<!-- 
Enable the session module. This can also be enabled on the WSS Web.config, 
but is not enabled by default. If you receive the following message:
Parser Error Message: The module 'Session' is already in the application 
and cannot be added again. You can remove the following 
<httpModules></httpModules> section as session is already enabled 
on the virtual server. 
--> 

<httpModules>
<add name="Session" type="System.Web.SessionState.SessionStateModule"/>
</httpModules> 

<!-- Enable session state for all the pages in the Web application. --> 
<pages enableSessionState="true" enableViewState="true" 
enableViewStateMac
="true" validateRequest="false" />

The original article .

posted @ 2004-07-02 18:25 min 阅读(1112) | 评论 (3)编辑

2004年6月10日 #

A VS.NET add-in to know the content of the any dataset during debugging

Special QuickWatch for a DataSet
By
mohammed barqawi

I think it's very useful....

Detail info: here

posted @ 2004-06-10 16:40 min 阅读(730) | 评论 (1)编辑

2004年6月2日 #

web based sql admin tool - Shusheng SQL Tool v1.0

web-based MS SQL Server(MSDE)2000 client tool, query analyzer and dba utility to design, create, query, backup, manage and monitor database from a web browser. Pure ASP script, no installation needed. Freeware for Educational and Personal usage.

...
nice tool :-)
DownLoad url

posted @ 2004-06-02 11:35 min 阅读(1433) | 评论 (1)编辑

2004年5月26日 #

Make Modal Forms

一直想用模式窗口来打开.aspx页面,但是只要是执行服务器端的事件就会有问题.前些天从codeproject里看到篇文章,才发现解决办法:
Ever try to create a pop-up in ASP.NET. but ASP.NET 1.0 and 1.1 didn’t come with a mechanism to support the concept of modal forms. In fact, many internet browsers lack built-in support for the concept of modal forms.

Solution 1, Base:

The modal form in IE is a little unusual. One way to overcome this weirdness involves placing the following statement in the header of the intended modal form:
<base target=”_self”>
Solution 2, Smart Navigation:
in Page_Load event:
Response.Cache.SetNoServerCaching();
Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache);
Response.Cache.SetNoStore();
Response.Cache.SetExpires(new DateTime(1900,01,01,00,00,00,00));

There are variations to this, but I tried to stick with ASP.NET code .



详细信息请进http://www.codeproject.com/aspnet/ThoseCrazyPopups.asp

posted @ 2004-05-26 17:19 min 阅读(1383) | 评论 (4)编辑