Snowfun

导航

统计
公告
 

2012年5月22日

IIS7出错以下错误

解决办法也很简单
再次安装IIS功能   在 万维网服务-应用程序开发上勾选asp。

 

单击“开始”按钮 ?开始?按钮图片,单击“控制面板”单击“程序”然后单击“打开或关闭 Windows 功能”

posted @ 2012-05-22 14:23 Snowfun 阅读(2) 评论(0) 编辑

2012年5月4日

 

 

 protected void gvValueList_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.Pager)
        {
            e.Row.Visible = false;
        }

        if (e.Row.RowIndex > -1)
        {
            e.Row.Attributes.Add("onmouseover""c=this.style.backgroundColor;this.style.backgroundColor='#F0F0E0'");
            e.Row.Attributes.Add("onmouseout""this.style.backgroundColor=c;");
            e.Row.Style.Add("cursor""hand");

            if (e.Row.RowIndex != gvValueList.EditIndex)
            {
                //((ImageButton)e.Row.Cells[iDele].Controls[0]).Attributes.Add("onclick", "isSubmit= confirm('是否刪除?');");
            }
        }

        //绑定gridview单元格内容过长,用tooltip,单元格截取指定长度,鼠标停留时显示全部内容,
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            e.Row.Cells[5].ToolTip = e.Row.Cells[5].Text;
            if (e.Row.Cells[5].Text.Length > 50) e.Row.Cells[5].Text = e.Row.Cells[5].Text.Substring(030) + "...";//字段长度大于50则显示前30个字符
        }
}

 

 

 protected void gvValueList_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        GvDataRowToolTip(e, 4);
        GvDataRowToolTip(e, 6);
        GvDataRowToolTip(e, 8);
        GvDataRowToolTip(e, 10);
    }
    /// <summary>
    
/// 绑定gridview单元格内容过长,用tooltip,单元格截取指定长度,鼠标停留时显示全部内容,
    
/// </summary>
    
/// <param name="e"></param>
    
/// <param name="id"></param>
    protected void GvDataRowToolTip(GridViewRowEventArgs e, int id)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            e.Row.Cells[id].ToolTip = e.Row.Cells[id].Text;
            if (e.Row.Cells[id].Text.Length > 100) e.Row.Cells[id].Text = e.Row.Cells[id].Text.Substring(0100) + "......";
        }
    }

 

 

http://apps.hi.baidu.com/share/detail/6835701

posted @ 2012-05-04 09:04 Snowfun 阅读(28) 评论(0) 编辑

2012年5月3日

SQL

 

declare  @SubTeamId varchar(100)
set @SubTeamId='T001/T006/T100/T123/'

--select len(@SubTeamId)                                        --结果为19
--
SELECT substring(@SubTeamId,0,charindex('/',@SubTeamId))            --结果为T001
--
select right(@SubTeamId,len(@SubTeamId)-charindex('/',@SubTeamId))  --结果为T006/T100/T123/  

while(charindex('/',@SubTeamId)>0)  
begin     
    select  substring(@SubTeamId,0,charindex('/',@SubTeamId))
    set @SubTeamId=right(@SubTeamId,len(@SubTeamId)-charindex('/',@SubTeamId))          
end 

 

posted @ 2012-05-03 08:32 Snowfun 阅读(8) 评论(0) 编辑

2012年5月2日

当前标识(NT AUTHORITY\NETWORK SERVICE)没有对“C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files”的写访问权限。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。
异常详细信息: System.Web.HttpException: 当前标识(NT AUTHORITY\NETWORK SERVICE)没有对“C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files”的写访问权限
解决方法:
运行:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis -i -enable
系统会显示正在安装.net。稍后一切恢复正常。
posted @ 2012-05-02 09:58 Snowfun 阅读(3) 评论(0) 编辑
 

错误信息
您正在搜索的页面可能已经删除、更名或暂时不可用。
HTTP 错误 404 - 文件或目录未找到。

解决方法
1、手动开始 ASP.NET 2.0 服务扩展:

 

 

 

 

 

 

 

 


(2)如果先安装vs.net2005,后安装IIS6,可以在vs2005命令提示下运行aspnet_regiis -i

3,如果还没有,那么就要重新在IIS中注册asp.net,方法如下:
(1) 打开命令窗口。(依次单击“开始”、“运行”,键入 cmd,然后单击“确定”。)
(2) 浏览到要使用的 Aspnet_regiis.exe 版本的目录(请记住,每个版本的 .NET Framework 都有自己的 Aspnet_regiis.exe 版本)。
该文件通常位于下列目录中: systemroot\Microsoft.NET\Framework\versionNumber
输入以下代码,回车,等待其安装完成 。
如:C:\Windows\\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis -i
如:C:\Windows\\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis -i


(3)您试图从目录中执行 CGI、ISAPI 或其他可执行程序,但该目录不允许执行程序。解决:配置IIS,主目录-> 执行权限-> 纯脚本

(4)您正在搜索的页面可能已经删除、更名或暂时不可用。解决:可以在WEB服务器扩展中打开asp.net2.0

(5)如果在使用express数据库时,提示“数据库是只读的”,可以进入IIS管理器,选择相应的数据库文件,在“属性”中选择“写入”,,如果还不好使,我们只需要在数据库的目录权限里添加上“IUSR_计算机名”用户就可以了,分给它“写入”权限。我发现一些文章说让加入EveryOne用户,并给“写入”权限,这个太危险了。原则上是此目录加的可以写入用户就是在IIS中配置的时候加的 Internet匿名访问用户,一般默认为“IUSR_计算机名”,不过如果是虚拟主机就要自己看看了。

(6)所有配置都已经检查,系统提示《无法显示网页》,可能原因是在IIS中配置了主机头,而主机头配置错误,正确的主机主应当是类于:http://www.gogolike.com/

posted @ 2012-05-02 09:51 Snowfun 阅读(4) 评论(0) 编辑
 
系统存在其它服务器软件啊,比如IIS这个的端口是80和apache是一样的,IIS启动后会占用80端口,apache无法启动了,把IIS关闭就可以了!
posted @ 2012-05-02 08:30 Snowfun 阅读(7) 评论(0) 编辑

2012年4月10日

 

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="testPic3.aspx.cs" Inherits="testPic3" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>图片效果</title>
    <script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>  
    <style type="text/css"
        #tip   {position:absolute;color:#333;display:none;}  
        #tip s   {position:absolute;top:40px;left:-20px;display:block;width:0px;height:0px;font-size:0px;line-height:0px;border-color:transparent #BBA transparent transparent;border-style:dashed solid dashed dashed;border-width:10px;}  
        #tip s i   {position:absolute;top:-10px;left:-8px;display:block;width:0px;height:0px;font-size:0px;line-height:0px;border-color:transparent #fff transparent transparent;border-style:dashed solid dashed dashed;border-width:10px;}  
        #tip .t_box   {position:relative;background-color:#CCC;filter:alpha(opacity=50);-moz-opacity:0.5;bottom:-3px;right:-3px;}  
        #tip .t_box div  {position:relative;background-color:#FFF;border:1px solid #ACA899;background:#FFF;padding:1px;top:-3px;left:-3px;}  
        .tip   {width:82px;height:82px;border:1px solid #DDD;}  
    </style>  

     <script type="text/javascript">  
     $(function(){  
        $('.tip').mouseover(function(){  
           var $tip=$('<div id="tip"><div class="t_box"><div><s><i></i></s><img src="'+this.src+'" /></div></div></div>');  
            //var $tip=$('<div id="tip"><div class="t_box"><div><s><i></i></s><asp:Image runat="server" ImageUrl="'+this.ImageUrl+'" /></div></div></div>');  
           $('body').append($tip);  
           $('#tip').show('fast');  
        }).mouseout(function(){  
           $('#tip').remove();  
        }).mousemove(function(e){  
           $('#tip').css({"top":(e.pageY-60)+"px","left":(e.pageX+30)+"px"})  
        })  
     })  
     </script>  

</head>
<body>
    <form id="form1" runat="server">
    <div>
            <a href="#"><img class="tip" src="image/jingang2.jpg"  /></a>  
            <a href="#"><img class="tip" src="image/1.jpg" /></a>  
            <a href="#" ><img class="tip" src="image/2.GIF" /></a>  
            <a href="#" ><asp:Image   ID="Image1" runat="server" ImageUrl="image/jingang2.jpg" CssClass="tip" /></a> 
            <a href="#" ><asp:Image   ID="Image2" runat="server" ImageUrl="image/1.jpg" CssClass="tip" /></a>
    </div>
    </form>
</body>
</html>

 

 

jquery-1.3.2.min.js

 

posted @ 2012-04-10 08:55 Snowfun 阅读(98) 评论(0) 编辑

2012年4月9日

摘要: /Files/Snowfun/zoomer.for.jquery-1.0.zip<%@PageLanguage="C#"AutoEventWireup="true"CodeFile="Default.aspx.cs"Inherits="_Default"%><!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitiona阅读全文
posted @ 2012-04-09 15:29 Snowfun 阅读(28) 评论(0) 编辑

2012年4月6日

posted @ 2012-04-06 15:23 Snowfun 阅读(7) 评论(0) 编辑

2012年3月29日

摘要: 有些时候我们在IIS上测试网站时,会出现HTTP 错误 403.9 - 禁止访问:连接的用户过多,这是因为XP系统作为IIS服务器时默认的连接数只有10,所以才导致HTTP 错误 403.9 - 禁止访问:连接的用户过多这个问题。我们只需要改变IIS连接数就好了。由于XP的IIS本身没有提供性能这个选项卡,微软自己正好提供这个小工具,估计他们也感觉到了这些问题了吧,微软出的一个管理IIS的小工具,名字叫做MtaEdt22.exe 下载地址:http://ishare.iask.sina.com.cn/f/6329971.html下载后执行MtaEdt22.exe,安装步骤如下:600)make阅读全文
posted @ 2012-03-29 08:45 Snowfun 阅读(9) 评论(0) 编辑