分类:Web编程
共 938 篇
1.先制作两个主题Default和Blue App_Themes\Default\Default.skin: App_Themes\Blue\Blue.skin: 2.动态加载主题 Default.aspx: Default.aspx.cs: ASP.NET主题说明 ·一个主题通常包含皮肤文件、css文件和图片资源等; ·皮肤文件中定义的是服务器控件外观,css文件通常定义页面和普通html控件样式; ·皮肤可分为默认皮肤和命名皮肤,命名皮肤有SkinID属性,默认皮肤没有; ·皮肤文件中只允许出现控件外观相关属性的设置,设置非外观属性值将出错; ·主题下的css文件不需格外引用,自动应用到页面中,但要求页面上有;…
📂 Web编程
👤 博主
📅 2009-01-07
👁 5265
👍 0
阅读全文 →
有时我们给一个ASP.NET页面指定使用了一个主题后,又想单独为某个控件设置外观(不使用默认外观),这时可采用的方法有两种:一是使用命名的控件外观,二是在@Page指令中使用StylesheetTheme属性来代替常用的Theme。下边使用具体实例说明下两种方法的使用: 1.使用命名的控件外观 App_Themes\Default\Default.skin: Default.aspx: 2.@Page指令中使用StylesheetTheme属性来指定使用的主题 App_Themes\Default\Default.skin: Default.aspx: 说明:如果控件的同一种样式在外观文件和控件属性中都有定义的话, 使用Theme时则定义在外观文件中的样式发生作用,使用StylesheetTheme时则是定义在控件属性中的样式起作用!
📂 Web编程
👤 博主
📅 2009-01-07
👁 4383
👍 0
阅读全文 →
T-SQL: C#:
📂 Web编程
👤 博主
📅 2009-01-06
👁 5142
👍 0
阅读全文 →
·string是C#中的类,String是.Net Framework的类(在C# IDE中不会显示蓝色)。 ·C# string映射为.Net Framework的String。 ·如果用string,编译器会把它编译成String,所以如果直接用String就可以让编译器少做一点点工作。 ·如果使用C#,建议使用string,比较符合规范。 ·string始终代表 System.String(1.x) 或 ::System.String(2.0),String只有在前面有using System;的时候并且当前命名空间中没有名为String的类型(class、struct、delegate、enum)的时候才代表System.String。…
📂 Web编程
👤 博主
📅 2009-01-05
👁 3446
👍 0
阅读全文 →
微软中间语言 (MSIL) 是一种语言,是许多编译器(C#、VB.NET等)的输出。ILDasm (中间语言反汇编器)程序和.Net Framework SDK(FrameworkSDK\Bin\ildasm.exe)打包在一起,让用户以人可阅读的格式查看MSIL代码。通过该工具,我们可以打开任何.net可执行文件(exe或dll)并查看其MSIL代码。下边我们来看看怎么使用: 1.在VS2008中新建一个Windows窗体应用程序,输入如下代码后生成解决方案: 2.运行ildasm,打开刚生成的exe文件,可以看到如下内容: 3.在ildasm中双击"Form1_Load: void(object,class System.EventArgs)"即可看到上边代码的MSIL代码:…
📂 Web编程
👤 博主
📅 2008-12-30
👁 6691
👍 0
阅读全文 →
对于上边的代码,大家都知道最终j=0,i=1,之前为了方便记忆,记它的口诀是先赋值再递增,以区别于j=++i(先递增再赋值),所有理解中就有了这么一个执行顺序: 再来看看今天的代码: 再按之前的理解,那么i最终的结果就应是1,但正确的结果是i为0!所以上边的理解自然就是错的,正确的理解方式应从运算顺序来解释,i=i++的运算顺序是从右到左,那么执行顺序就应为: 1) i++;//运算结果为0,i的值为1 2) i=0;//将第一步的运算结果赋值给i 这样就解释了为什么i的值为0
📂 Web编程
👤 博主
📅 2008-12-30
👁 6022
👍 0
阅读全文 →
在对内容进行编辑的时候,有些内容是以列表(select)的形式显示的,为了方便编辑,我们希望上次提交的列表项能设置为选中项,以前ASP 中经常这么写: 今天在dedecms中看到另一种思路:
📂 Web编程
👤 博主
📅 2008-12-29
👁 3926
👍 0
阅读全文 →
建立池连接可以显著提高应用程序的性能和可缩放性。SQL Server .NET Framework 数据提供程序自动为 ADO.NET 客户端应用程序提供连接池(MSDN)。 Opening a database connection is a resource intensive and time consuming operation. Connection pooling increases the performance of Web/windows applications by reusing active database connections instead of creating a new connection with every request. Connection pool manager maintains a pool of open database connections. When a new connection requests come in, the pool manager checks if the pool contains any unused connections and returns one if available. If all connections currently in the pool are busy and the maximum pool size has not been reached, the new connection is created and added to the pool. When the pool reaches its maximum size all new connection requests are being queued up until a connection in the pool becomes available or the connection attempt times out. Connection pooling behavior is controlled by the connection string parameters. Please look into MSDN documents in the reference link if you want to know further information.…
📂 Web编程
👤 博主
📅 2008-12-26
👁 4475
👍 0
阅读全文 →
联盟平台周期性的打不开,查了下日志,错误原因都为: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. 超时时间已到。超时时间已到,但是尚未从池中获取连接。出现这种情况可能是因为所有池连接均在使用,并且达到了最大池大小。 下边是来自网上的解决方法: 一、看所有open的连接是否都close了。…
📂 Web编程
👤 博主
📅 2008-12-26
👁 4772
👍 0
阅读全文 →
上边存储过程执行的时候老是提示: 将@strSQL语句输出再在查询分析器中执行却没有问题,其原因是临时表有作用域的,上边临时表的作用域只在exec内部有效!解决方法:改用全局临时表!
📂 Web编程
👤 博主
📅 2008-12-23
👁 8086
👍 0
阅读全文 →