相对于asp.net web配置中的

   <httpModules>
      <add name="FluorineGateway" type="FluorineFx.FluorineGateway, FluorineFx"/>
    </httpModules>

在asp.net mvc3下需要移动到

 <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <modules runAllManagedModulesForAllRequests="true">

     <add name="FluorineGateway" type="FluorineFx.FluorineGateway, FluorineFx" />
    </modules>

  </system.webServer>

否则会报faultCode:Client.Error.MessageSend faultString:'Send failed'

faultDetail:'Channel.Connect.Failed error NetConnection.Call.BadVersion: :

 url: http://localhost/Gateway.aspx

的错误

posted @ 2011-04-24 10:04 ermite 阅读(137) 评论(1) 编辑

      默认的以"metadata=res://*/ "开头的连接串包含了对象的键信息,

 

View Code
1 <EntityType Name="table">
2           <Key>
3             <PropertyRef Name="UserID" />
4           </Key>
5 ...

 

所以在类中不必加[Key]等属性,这种方式对于DataBase First方式显得非常重要,每次更新数据库后,类会重新生成,如果用普通的连接串则会报

System.Data.Edm.EdmEntityType: : EntityType 'table' has no key defined. Define the key for this EntityType

System.Data.Edm.EdmEntitySet: EntityType: The EntitySet table is based on type table that has no keys defined.

posted @ 2011-04-12 13:35 ermite 阅读(172) 评论(0) 编辑
摘要: 去掉IPostBackDataHandler后,RaisePostBackEvent就执行了,为什么?控件的源码如下:usingSystem;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;usingSystem.ComponentModel;namespaceTestMyRaise{/**////<summary>///RaiseT...阅读全文
posted @ 2005-12-06 11:10 ermite 阅读(475) 评论(1) 编辑

做权限管理的时候遇到的问题,想让明细权限按模块名称纵向排列后再绑定到DataGird,解决方法如下:

select *  from(
 
 
 
select  ID, 权限名称,模块名称,菜单名称,权限地址,模块序号 from T_sys_right_info
as T1
union 
select '0' as ID,模块名称 as 权限名称,
模块名称,模块名称 
as 菜单名称,模块名称 as 权限地址 ,模块序号
 
from ( select distinct top 50 模块名称,模块序号   from T_sys_right_info order by 模块序号,模块名称 ) 
 
AS T2 
 
)
as T3
 

order by T3.模块序号,T3.模块名称
表结构:
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[T_Sys_Right_Info]'and OBJECTPROPERTY(id, N'IsUserTable'= 1)
drop table [dbo].[T_Sys_Right_Info]
GO

CREATE TABLE [dbo].[T_Sys_Right_Info] (
    
[ID] [int] IDENTITY (11NOT NULL ,
    
[权限名称] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
    
[模块名称] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
    
[菜单名称] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
    
[权限地址] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NOT NULL ,
    
[模块序号] [int] NOT NULL ,
    
[菜单序号] [int] NOT NULL 
ON [PRIMARY]
GO

然后在DataGrid的DataItemBound事件做处理,如果是模块名称的行,则只显示其中一列,并加入ColSpan
posted @ 2005-09-30 14:08 ermite 阅读(180) 评论(0) 编辑

 

 1<script>
 2function calc(o)
 3{
 4    if(Number(o)<2)
 5    {
 6        return o;
 7    }

 8    var arr=new Array(0,1);
 9    for(var i=1;i<Number(o);i++)
10    {
11    arr[1]=arr[0]+arr[1];
12    arr[0]=arr[1]-arr[0];
13    }

14    return arr[1];
15
16}

17</script>
18月份:
19<input id="input">
20结果:
21<input id="result" >
22<input type=button value="Calc" onclick="result.value=calc(input.value)">
23
posted @ 2005-09-30 13:43 ermite 阅读(97) 评论(0) 编辑