1. 打开vs 2008的工具>选项>HTML设计器时提示:加载此属性页时出错

2. 打开 .aspx 文件是, 只有HTML编辑视图,没有视图切换选项

在命令行中运行:devenv /ResetSkipPkgs 即可解决该问题.

posted @ 2009-03-17 16:57 S.Sams 阅读(232) | 评论 (3)编辑

该错误只在IE中出现,出现该提示的原因主要有两种:

     1. 重定义了系统的触发事件名称作为自定义函数名如:  onclick / onsubmit ...  都是系统保留的事件名称,不允许作为重定义函数名称。

     2. 出现死循环,都提示:Stack overflow at line: 0 , 如:在图片对象定义了 onerror 事件的循环处理、

          <img src="/images/a.gif" onerror="this.src='/image/block.gif'" />

          这里并不是说 /images/a.gif 不存在, 可能是由于网络原因造成, 这时会执行 onerror 事件,  调用 /images/block.gif 去做当前图片的路径, 但如果当前 /image/block.gif 这个图片文件不存在, 再或者由于网络原因, '/image/block.gif' 下载又出现错误时, 就出现了死循环。

          所以在处理 onerror 事件时,要考虑是否是出现这样的问题。

     ” Stack overflow at line: 0 “ 该错误不是一直出现,是有时会出现, 是网络不正常导致死循环引起的, 查了好半天, 最后才找到这个原因,做下记号吧, 给有需要的人。

posted @ 2009-01-18 12:06 S.Sams 阅读(1136) | 评论 (4)编辑
     摘要: This week I’ve been working on a project that required data to be shown visually. I needed a Chart Script that was attractive yet gets the data across. The Charts scripts below are built using JavaScript, Flash, Silverlight, and Java. Flot - Flot is a pure Javascript plotting library for jQuery. The focus is on easy usage , attractive plots and interactive features. With Flot you can interact with the data, look at specific data by zooming in, plot a time series, and other various options.   阅读全文
posted @ 2009-01-02 19:09 S.Sams 阅读(233) | 评论 (0)编辑
     摘要: I’ve seen a lot of reports where people have trouble getting ASP.NET MVC up and running on IIS 6. Sometimes the problem is a very minor misconfiguration, sometimes it’s a misunderstanding of how IIS 6 works. In this post, I want to provide a definitive guide to getting ASP.NET MVC running on IIS 6. I will walk through using the .mvc or .aspx file extension for URLs first, then I will walkthrough using extension-less URLs. If you’re running into problems with IIS 6 and ASP.NET MVC, I recomm  阅读全文
posted @ 2008-12-11 19:19 S.Sams 阅读(665) | 评论 (1)编辑

今天在查阅 MSDN 文档时发现这个接口, 其实在线状态的接口, Live已经提供了, 但是需要用户自己操作才能获到该地址. 而且是加密的.


http://messenger.services.live.com/users/d67cb5fcd15e35a5@apps.messenger.live.com/presenceimage?mkt=zh-cn

 

现在有以下的接口参数就太方便了. 可在自己定义状态的图片信息等.

http://messenger.services.live.com/users/youliveid@msn.com/presence/?cb=showpresence

{
    "icon": {
        "url": "http://www.wlmessenger.net/static/img/presence/Online.gif", "height": 16, "width": 16
    }, "statusText": "Online", "status": "Online", "displayName": "s.sams", "id": "youliveid@msn.com"
}

再结合 Newtonsoft.Json 完全实现自定义操作.

http://www.codeplex.com/Json

 

Code(该摘自:Json.net/Newtonsoft 3.0 新特性JObject/Linq to Json )
static void Main(string[] args)
{
string str = "{title:123,body:456,list:{title:'这是一个标题',body:'what'}}";
JObject o = JObject.Parse(str);
Console.WriteLine(o[
"title"]);
Console.WriteLine(o[
"body"]);
Console.WriteLine(o[
"list"]["title"]);
Console.WriteLine(o[
"list"]["body"]);
Console.ReadKey();
}

 

更多技术文档请参阅: http://dev.live.com/Messenger/default.aspx

附上MSN在线小图标直接地址: http://messenger.services.live.com/users/youmsnid@msn.com/presenceimage/
Live 在线状态生成地址: http://settings.messenger.live.com/applications/CreateHtml.aspx

补充一下: 其实在 http://www.onlinestatus.org/ 是可以生成在线图标的, 但服务很不稳定.

posted @ 2008-09-19 16:49 S.Sams 阅读(1651) | 评论 (4)编辑
BIND 9.5.1b1 is a beta release for BIND 9.5.1

BIND version 9 is a major rewrite of nearly all aspects of the underlying BIND architecture.

BIND 9.5 is the current release of BIND. It is supported, and bug fixes and security fixes will be made available as minor releases (9.5.y).

Some of the important features of BIND 9 are:

  • DNS Security
    • DNSSEC (signed zones)
    • TSIG (signed DNS requests)
  • IP version 6
    • Answers DNS queries on IPv6 sockets
    • IPv6 resource records (AAAA, DNAME, etc.)
    • Experimental IPv6 Resolver Library
  • DNS Protocol Enhancements
    • IXFR, DDNS, Notify, EDNS0
    • Improved standards conformance
  • Views
    • One server process can provide multiple "views" of the DNS namespace, e.g. an "inside" view to certain clients, and an "outside" view to others.
  • Multiprocessor Support
  • Improved Portability Architecture

BIND version 9 development has been underwritten by the following organizations:


[ Downloads ]
[ Notes ]
[ Documentation ]
[ Building BIND ]
[ Release Notes ]
[ Upcoming Fixes ]


DOWNLOADS

</COLS=6>

Package
Download
Signatures

Source
bind-9.5.1b1.tar.gz
asc
sha256
sha512

Windows XP/2003/2008 Binary Kit
BIND9.5.1b1.zip
asc
sha256
sha512

Windows XP/2003/2008 Debug Build Binary Kit
BIND9.5.1b1.debug.zip
asc
sha256
sha512

All ISC software is signed with our OpenPGP Key

You can download ISC software either from our master site, or at a number of mirror sites across the globe.

posted @ 2008-09-12 14:19 S.Sams 阅读(335) | 评论 (2)编辑

您只需要定位经纬度就可以轻易实现 Google Maps, 让您在轻松的C#环境中非常简便地实现基于 javascript 的地图, 您不用去查找 google 大量的地图文档便可轻松完成复杂的地图功能, 当然您同样可以在当前生成的基础上进行扩展, 实现更加个性化的地图!

对 Google Maps API 全面集成!

生成一张地图, 就是这么简单

	Init inits = new Init("showmymap");
List<Label> labels = new List<Label>()
{
new Label(){X = 23.134391,Y = 113.287550}
};
MapScript.Text =  new Maps(AppId, inits, labels).ToString();

下载Demo实例: http://code.google.com/p/donetgooglemapsapi/downloads/list 如果您需要更多的个性化功能, 接着往下看(系统设置项).

2008-08-28 新增

增加多标签 Tab 项支持
Javascript 脚本压缩输出
增加用户自定义标注支持
用户自定义标注点支持消息显示和回调函数自定义 CallBack
改进 google maps 处理流程
标注点 ZoomIn 支持 0 值, 不改当前地图的 ZoomIn 值
增加地图启用鼠标滚轮动作控制 

2008-08-29 新增

增加标注点缩略图预览 Label.IsShowMapView = true 即可!
增加支持将地图输出为图片 

2008-08-30 新增

增加标注点支持消息显示框放大和内容重置
增加支持地图搜索功能
支持地图Javascript引擎地址自定义(可切换到 http://ditu.google.com/)
重写标注点定义 

2008-09-08 更新

修正地图生成图片bug
动态加载 javascript onload / onunload 事件 

源代码SVN: http://donetgooglemapsapi.googlecode.com/svn/trunk/

看下如何实现

    /// <summary>
/// MapPageBase 处理了 // onload="initialize()" onunload="GUnload()" 这两个事件, 如果不使用继承, 请自行处理该事件!
/// </summary>
public partial class Example : MapPageBase
{
protected void Page_Load(object sender, EventArgs e)
{
// 在这里申请你的 AppKey
// http://code.google.com/apis/maps/signup.html
string AppId = "ABQIAAAAT2TW27KPpzTcS3Av9rRZ8xTMc_QNvQYPZO4F6J-ygmVXuqkocRS6gkKMvUKO2am7UGh-wFKm8McGSQ";
//默认初始化
//Init inits = new Init("showmymap",15);
Init inits = new Init("showmymap") { Maptype = MapType.G_PHYSICAL_MAP};
// 定义经纬度坐标点
List<Label> labels = new List<Label>()
{
new Label()
{
X = 23.134391,
Y = 113.287550,
// ------------- 以下是可选项, 可以不设置, 使用系统的默认值 ------------
IsCenter = true,  // 设置中心点, 存在多点只设置一点即可
Msg = "一起飞国际机票网",
MsgMaxContent = "信息框放大显示的内容,可以为空,不设置!",
MsgMaxTitle = "显示的标题, 可以为空,不设置!"
// ------------------------------------------------------------------
}
};
// 设置地图入参
Maps map = new Maps(AppId, inits, labels);
// 生成地图
MapScript.Text = map.ToString();
// 生成图片地图
ShowStaticMap.ImageUrl = map.ToImagePath(500, 500);
}
}

系统设置项

posted @ 2008-09-09 09:29 S.Sams 阅读(4226) | 评论 (46)编辑
     摘要:   阅读全文
posted @ 2008-08-11 21:15 S.Sams 阅读(29) | 评论 (0)编辑

非常讨厌在网页写文章, 写了半又没了, 又得重头来. 发下牢骚, 接着来!


实现功能:

     1. Tooltip

     2. Validate 表单验证

 

     可分开独立使用    

 

     您可以不写一行代码, 只需设置验证规则即可

 

     其实园子已经存在不少基于jQuery的验证插件, 如: http://www.cnblogs.com/wzmaodong/archive/2008/05/21/1203962.html

但感觉使用起来过于麻烦, 要实现在大堆表单的验证, javascript 代码一大堆. 所以这里的设计原则就是使用便捷, 易维护, 同时适应性大.

在验证中使用了自定义正则表达式, 这样用起来就非常方便了.  先看下最后的效果图

 

     1. 即时表单验证和提示

      

 

     2.  提交表单时验证

       

 

     下面看下我们如何在 asp.net 中实现便捷的提示功能和表单验证功能

     

 

 

Code

 

 

 

 以上的实现是不是很方便, 不用写大堆的 javascript 逻辑代码便可轻松实现验证和提示功能

 

通过调用 $(document).ready(function() {jQuery('input[tip],input[reg]').tooltip({onsubmit: true})}); 便完成数据的验证和提示功能. (该调用已集成在tooltip.js中)

onsubmit: true 这里设置是否触发 onsubmit 的提交验证事件.

 

再看看 CSS 的实现

 

 

 

.tooltipinputerr
{
    padding
: 2px 0 2px 18px;
    border
: solid 1px red;
    background
: #ffff99 url(/images/exclamation.png) no-repeat 2px center;
    
}

    
.tooltipinputok
{
    padding
: 2px 0 2px 18px;
    border
: solid 1px green;
    background
: url(/images/accept.png) no-repeat 2px center;
    
}

    
.tooltipshowpanel
{
    z-index
: auto;
    display
: none;
    position
:absolute;
    width
: 276px;
    height
: 35px;
    overflow
: hidden;
    text-indent
: 5px;
    line-height
: 40px;
    font-size
: 12px;
    font-family
: Arial;
    background
: url(/images/tooltop.gif) no-repeat left top;
    opacity
:0.9;
    filter
: alpha(opacity=90);
    
}

 

 

 

 

 使用方法:

     一.

Download jQuery

  二. 加入以上样式和引用tooltip.js文件

      

Tooltip.pack.js 1KB 0 2008/8/6 22:41:16
Tooltip.mini.js 1KB 0 2008/8/6 22:41:11
Tooltip.js 3KB 0 2008/8/6 22:41:04

 

 

 完整Demo下载  jquery-tooltip.rar 

 

     支持 Select Demo jquery-tooltip_select.rar

 

 

 版本更新下载: TooltipAndRegex.rar

 

posted @ 2008-08-07 00:09 S.Sams 阅读(4497) | 评论 (58)编辑

http://lab.berkerpeksag.com/jGrow

What is jGrow?

jGrow is a jQuery plug-in that makes the textarea adjust its size according to the length of the text.

It works smoothly with jQuery 1.2.x. It was tested on IE6/7, Firefox 2.0.x and Opera 9.x, and no bug was spotted yet.

非常好一个jQuery插件, 但原版不支持 Ctrl + V 的键盘操作事件, 直接代码.

 /* 原版代码.
 * jGrow 0.2
 * 08.02.2008
 * 0.2 release: 04.03.2008
 */
 
 (function($) {

  $.fn.jGrow = function(options) {

   var opts = $.extend({}, $.fn.jGrow.defaults, options);

   return this.each(function() {

    $(this).css({ overflow: "hidden" }).bind("keypress", function() {

     $this = $(this);

     var o = $.meta ? $.extend({}, opts, $this.data()) : opts;

     if(o.rows == 0 && (this.scrollHeight > this.clientHeight)) {
      
      this.rows += 1;
      
     } else if((this.rows <= o.rows) && (this.scrollHeight > this.clientHeight)) {

      this.rows += 1;

     } else if(o.rows != 0 && this.rows > o.rows) {

      $this.css({ overflow: "auto" });

     }

     $this.html();

    });

   });

  }

  $.fn.jGrow.defaults = { rows: 0 };

 })(jQuery);

 

以下为改进后的代码, 支持 Ctrl+V 键盘事件操作

 /*
 * jGrow 0.2
 * 08.02.2008
 * 0.2 release: 04.03.2008
 */
 
 // Updated by S.Sams 2008-07-24 21:47 以兼容Ctrl+V的操作
 
 (function($) {

  $.fn.jGrow = function(options) {

   var opts = $.extend({}, $.fn.jGrow.defaults, options);

   return this.each(function() {
   
    var isCtrl = false;
    
    $(this).css({ overflow: "hidden" }).bind("keypress", function() {
    
        $this = $(this);
       
     var o = $.meta ? $.extend({}, opts, $this.data()) : opts;

     if(o.rows == 0 && (this.scrollHeight > this.clientHeight)) {
      
      this.rows += 1;
      
     } else if((this.rows <= o.rows) && (this.scrollHeight > this.clientHeight)) {

      this.rows += 1;

     } else if(o.rows != 0 && this.rows > o.rows) {

      $this.css({ overflow: "auto" });

     }

     $this.html();

    }).bind("keydown",function(event){
    
        if(event.keyCode == 17) isCtrl = true;
          
    }).bind("keyup",function(event){

        if(isCtrl && event.keyCode == 86)
        {
         var o = $.meta ? $.extend({}, opts, $this.data()) : opts;
            var getCL = this.value.split('\n').length
         if( getCL <= o.rows)
         {
             this.rows = getCL;
         }
         else
         {
             this.rows = o.rows;
             $(this).css({ overflow: "auto" });
         }
         isCtrl = false;
     }
    });

   });

  }

  $.fn.jGrow.defaults = { rows: 0 };

 })(jQuery);

 

 // 自适应 textarea 有内容存在的高度自动调整

 /*
 * jGrow 0.2
 * 08.02.2008
 * 0.2 release: 04.03.2008
 */

 // Updated by S.Sams 2008-07-24 21:47 以兼容Ctrl+V的操作

 (function($) {

  $.fn.jGrow = function(options) {

   var opts = $.extend({}, $.fn.jGrow.defaults, options);

   return this.each(function() {

    var isCtrl = false;

    $(this).css({ overflow: "hidden" }).bind("keypress", function() {

        $this = $(this);

     var o = $.meta ? $.extend({}, opts, $this.data()) : opts;

     if(o.rows == 0 && (this.scrollHeight > this.clientHeight)) {

      this.rows += 1;

     } else if((this.rows <= o.rows) && (this.scrollHeight > this.clientHeight)) {

      this.rows += 1;

     } else if(o.rows != 0 && this.rows > o.rows) {

      $this.css({ overflow: "auto" });

     }

     $this.html();

    }).bind("keydown",function(event){

        if(event.keyCode == 17) isCtrl = true;

    }).bind("keyup",function(event){

        if(isCtrl && event.keyCode == 86)
        {
         var o = $.meta ? $.extend({}, opts, $this.data()) : opts;
            var getCL = this.value.split('\n').length
         if( getCL <= o.rows)
         {
             if(getCL > parseInt(this.rows))
                 this.rows = getCL;
         }
         else
         {
             this.rows = o.rows;
             $(this).css({ overflow: "auto" });
         }
         isCtrl = false;
     }
    });

    // Updated by S.Sams 2008-07-25
    // 修正 testarea 有内容存在的情况下的自动调整高度
    if($(this).val().length > 0)
    {
     var o = $.meta ? $.extend({}, opts, $(this).data()) : opts;
     var getCL = this.value.split('\n').length
     if( getCL <= o.rows)
     {
      if(getCL > parseInt(this.rows))
       this.rows = getCL;
     }
     else
     {
      this.rows = o.rows;
      $(this).css({ overflow: "auto" });
     }
    }

   });

  }

  $.fn.jGrow.defaults = { rows: 0 };

 })(jQuery);

posted @ 2008-07-24 21:57 S.Sams 阅读(487) | 评论 (1)编辑