摘要: 搜集来的,很实用,大家来分享,代码在最下方[代码] 阅读全文
posted @ 2008-09-04 14:14 LanceZhang 阅读(3439) 评论(15) 推荐(0) 编辑
摘要: Calling Web Services From Html Pages using Javascript 下载代码http://www.codeproject.com/KB/webservices/CallWebServiceFromHtml.aspx Web Services using WebService Behavior and .NET 下载代码http://www.codeproje... 阅读全文
posted @ 2008-09-02 18:39 LanceZhang 阅读(800) 评论(0) 推荐(0) 编辑
摘要: 方法一:使用"•"来当圆角:[代码]方法二:来自:http://www.cnblogs.com/scgw/articles/927682.html[代码]方法三:来自:http://www.cnblogs.com/pointdeng/articles/1171323.html[代码] 阅读全文
posted @ 2008-09-02 16:30 LanceZhang 阅读(3061) 评论(1) 推荐(0) 编辑
摘要: Do you want to draw a calendar with event, just like http://www.google.com/calendar/renderBut you don’t know how to start, right?If so, I suggest you begin with some easier examples, because the... 阅读全文
posted @ 2008-09-01 18:36 LanceZhang 阅读(2031) 评论(0) 推荐(0) 编辑
摘要: we cannot remove the header and footer easily, it is controlled by the Windows Registry, and we can set it at the: FileàPage Setup (for IE)And you can modify the following Windows Registry Key (M... 阅读全文
posted @ 2008-09-01 18:23 LanceZhang 阅读(1999) 评论(4) 推荐(0) 编辑
摘要: 情景:有些环境下我们需要根据页面中JavaScript变量的值来确定某个(某些)超链接的参数,如“http://www.bla.com/test.aspx?var1=”中,究竟var1等于多少,要根据JavaScript变量来判定方法一:很简单,客户端脚本[代码][代码]方法二:在服务端Load时赋值 The easiest way would be to add the ... 阅读全文
posted @ 2008-09-01 18:16 LanceZhang 阅读(4545) 评论(0) 推荐(0) 编辑
摘要: JavaScript操作DropDownList的通用方法,来自ASP.NET Forum, NC01[代码] 阅读全文
posted @ 2008-09-01 16:56 LanceZhang 阅读(2238) 评论(2) 推荐(0) 编辑
摘要: [代码][代码][代码] 阅读全文
posted @ 2008-09-01 09:27 LanceZhang 阅读(881) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2008-08-29 18:39 LanceZhang 阅读(8257) 评论(3) 推荐(0) 编辑
摘要: In that scenario, I have some suggestions:First, please try to keep the node number of TreeView less than 1000, we can find that advice there:http://msdn.microsoft.com/en-us/library/ms529261.aspxRende... 阅读全文
posted @ 2008-08-29 17:41 LanceZhang 阅读(2391) 评论(0) 推荐(0) 编辑
摘要: 前些天发了一篇 使用JavaScript选择GridView行的方法汇总(Select row of GridView by JavaScript) 有朋友反馈说不适用于DataGrid,确实,如果要在DataGrid的行中添加JavaScript事件捕捉,必须用下面的代码:[代码] 阅读全文
posted @ 2008-08-29 13:21 LanceZhang 阅读(1802) 评论(0) 推荐(0) 编辑
摘要: JavaScript能访问客户SQL数据库?能!真的能!要求:SQL Server2000(其它版本没试过),且数据库必须安装了WMI扩展(WMI SQL Server Administration Provider,能在SQL Server2000安装光盘的"x86otherwmi" 目录下找到)好了,接下来我们试试代码吧:(code from http://www.devarticles.co... 阅读全文
posted @ 2008-08-27 19:56 LanceZhang 阅读(1506) 评论(5) 推荐(0) 编辑
摘要: 使用JavaScript实现:[代码] 阅读全文
posted @ 2008-08-27 19:45 LanceZhang 阅读(1269) 评论(2) 推荐(0) 编辑
摘要: (奇怪,不知道客户要这个效果做什么)效果:如果点击超链接,将正常导向;如果按住Ctrl键并点击超链接,将执行一段JS代码,并且浏览器不会导向或打开新页面[代码] 阅读全文
posted @ 2008-08-27 19:38 LanceZhang 阅读(1317) 评论(0) 推荐(0) 编辑
摘要: 页面上有TextBox,供用户输入数据,当用户点击页面上的超链接时会进入另一个页面,这时候,再点击浏览器“后退”按钮,就会回到原来的页面,并显示刚才在TextBox中输入的文字。然而,有些时候这些数据是机密的,不能在这种情况下显示,于是问题就产生了。。网上有很多尝试方法,比如设置meta、关闭ViewState等等,我试过,都没用,我目前最好的办法就是使用JavaScrip... 阅读全文
posted @ 2008-08-27 17:21 LanceZhang 阅读(1488) 评论(0) 推荐(0) 编辑
摘要: ModalPopupExtender是个非常好用的AJAX控件, 网上有很多教程,但大多没有提起它的一些使用技巧:1.简单应用:常用属性:TargetControlID:用于触发弹出面板的控件。OkControlID:弹出面板中的确认按钮,用于确认新的样式。 OnOkScript:当单击确认按钮后,关闭样式面板后,执行脚本。CancelControlID:样式面板中的取消按钮,用于取消应用样式。P... 阅读全文
posted @ 2008-08-27 16:02 LanceZhang 阅读(8939) 评论(0) 推荐(0) 编辑
摘要: 先说说我的方法吧,不是最好的,却是代码量最少的一行:[代码]呵呵有点夸张了,具体做法是在GridView的RowDataBound事件里写这么写:[代码]原理很简单,在ASP.NET的页面Render时,GridView的选择、删除、编辑 等事件会产生简单的postback 参数,分别是select$, Update$, Edit$...这样就给我们带来了很大的便利,在上面的例子中,就使用了Sel... 阅读全文
posted @ 2008-08-26 19:19 LanceZhang 阅读(2649) 评论(1) 推荐(0) 编辑
摘要: 一个客户说要用DIV+CSS布局,两列,其中导航列宽度不确定(由里面的TreeView控件确定),而与它并列的内容列宽度要做到自适应,也就是内容列宽度+导航列宽==固定值(总宽度)但是,内容列宽度 和导航列宽 都没有一个定值,而网上的大多自适应列宽代码都是基于一个定值的无奈,我写Winform出身的对CSS+DIV知之甚少,只能通过JavaScript来完成了,效果还可以,IE7.0和Firefo... 阅读全文
posted @ 2008-08-26 18:47 LanceZhang 阅读(3726) 评论(0) 推荐(0) 编辑
摘要: 如今各种各样的日历控件满天飞(参见http://www.cnblogs.com/blodfox777/archive/2008/08/13/1266639.html),使用ASP.NET Calendar控件的朋友貌似不多了,但今天一个客户的古怪问题却让我想起了它的一个大优点:可以按照自己的要求进行定制!问:Scenario: I have a calendar control in an asp... 阅读全文
posted @ 2008-08-26 18:26 LanceZhang 阅读(2002) 评论(0) 推荐(0) 编辑
摘要: 之前发过用POST方式的http://www.cnblogs.com/blodfox777/articles/1271912.html而用__postback比较高阶,代码出自NC01[代码][代码] 阅读全文
posted @ 2008-08-26 09:30 LanceZhang 阅读(923) 评论(0) 推荐(0) 编辑
摘要: RadEditor (Telerik). AJAX-enabled.WebHtmlEditor (Infragistics). Part of the NetAdvantage for ASP.NET suite (I think).Cute Editor (CuteSoft)FreeTextBox (FreeTextBox.com). Free for basic edition. Source... 阅读全文
posted @ 2008-08-25 17:52 LanceZhang 阅读(6962) 评论(0) 推荐(1) 编辑
摘要: To detect the browser, please try the following code:[代码]in a 64bit lab, the following like information will be show:[代码] 阅读全文
posted @ 2008-08-25 17:38 LanceZhang 阅读(1811) 评论(1) 推荐(0) 编辑
摘要: A customer said he has created a newsletter(HTML format) with background image, and it seems good in outlook 2003/gmail/yahoo/ie6/ie7/opera/fire-foxhowever, just in Outlook2007, the background image h... 阅读全文
posted @ 2008-08-25 17:25 LanceZhang 阅读(611) 评论(0) 推荐(0) 编辑
摘要: 代码是我很早之前收集的,忘记了原来的出处和自己修改了多少,如果有侵权,请联系我。[代码] 阅读全文
posted @ 2008-08-22 11:26 LanceZhang 阅读(975) 评论(0) 推荐(0) 编辑
摘要: Thanks Deva to provide the code:[代码] 阅读全文
posted @ 2008-08-22 09:29 LanceZhang 阅读(827) 评论(0) 推荐(0) 编辑
摘要: Please try the following code, it will work:[代码][代码]http://forums.asp.net/t/1306676.aspx 阅读全文
posted @ 2008-08-22 09:24 LanceZhang 阅读(2550) 评论(0) 推荐(0) 编辑
摘要: We use window.open will be block by the browsers or blocker tools, and showModalDialogwill not be block by the browsers, but always blocked by blocker tools, the only way to open pop up window which c... 阅读全文
posted @ 2008-08-21 18:37 LanceZhang 阅读(5445) 评论(0) 推荐(0) 编辑
摘要: in fact the onbeforeunload event supported in Firefox browser, but the window.event is not supported in Firefox.So, we can use the following code to stop page from leaving: function SaveRemind() { w... 阅读全文
posted @ 2008-08-20 20:00 LanceZhang 阅读(1151) 评论(0) 推荐(0) 编辑
摘要: 文章都不错,有几篇已经被园友翻译了Retrieving Data from Web Services using Standard HTTP 1.1 Compression http://www.dotnetjunkies.ddj.com/Tutorial/90D3B3E0-6544-4594-B3BA-E41D8F381324.dcikWhy use data compression for y... 阅读全文
posted @ 2008-08-20 18:23 LanceZhang 阅读(958) 评论(0) 推荐(0) 编辑
摘要: DropShadow控件:http://www.asp.net/AJAX/AjaxControlToolkit/Samples/DropShadow/DropShadow.aspx既方便又使用,给广大新手们带来了很大的便利,可以轻松的为Panel(DIV)等控件制作出圆角阴影效果,只需要如下代码就可以为Panel1添加美观的效果:[代码]但今天发现了这个控件的一个BUG: 如果我们把一个应用了Sh... 阅读全文
posted @ 2008-08-20 18:11 LanceZhang 阅读(616) 评论(3) 推荐(0) 编辑