07 2010 档案
摘要:在写代码时经常遇到字符串截取问题,下面是在C#编程中一种不错的截取方式。string str="A,B,C,D";string strTemp1=str.Split(new char[] { ',' })[0];string strTemp2=str.Split(new char[] { ',' })[2];则结果为 strTemp1 为 AstrTemp2 为 C
阅读全文
摘要:1.用脚本判断点击的是否为回车键<script type="text/javascript" > function EnterKeyClick() { if (event.keyCode == 13) { event.keyCode = 9; } } </script>2.前台<ext:FormLayout ID="FormLayout3" runat="server...
阅读全文
摘要:1.修正了第二次加载模块时出错。问题原因:问题不在加载模块中,而是在创建模块时。 复制manifest.php文件时,将模板(modules\SimpleMod\manifest.php)更改了。 在模板中'SimpleMod'这种变量是要在创建新模块时改新的。如'SimpleMod'变量应更新为新模块的名称。解决方案:在modules\Builder\BuildModule.php 文件中 1.在$xFileType = ".php"; 语句后写:$xPath = "cache/ModuleBuilder/"; 改变更新目标文件路径 2.将此语名 copy ("modules/SimpleM
阅读全文
摘要:1.logo图片 \themes\ClassicSugar\images\company_logo.png 在此文件中 \themes\ClassicSugar\header.html 2.登陆图片 \images\middle-bg.gif 3.默认主题 \config.php 'default_theme' = 'ClassicSugar' 4.不显示选择主题 \login.php 位置:td align=right主题:/tdtdselect style='width: 120px' name='login_theme' 注释掉。 注意:如果不是OA主题,应选择要用的
阅读全文
摘要:(一)后台写JavaScript方式Response.Write("<script>widow.alert(\" " + this.Test1.text + "\")</script>" );(二)Button的OnClientClick 属性方式注:点取消则不执行服务器端的OnClick事件例:<asp: button OnClientClick="return c...
阅读全文
摘要:Microsoft SQL serverwindows安全登陆 "Data Source=(local); Initial Catalog=Northwind; Integrated Security=True;"SQL Server登陆"Data Source=(local); Initial Catalog=Northwind; UserID=sa; PassWord=111111;"Acce...
阅读全文
摘要:C#中委托与事件的基本使用方法://定义委托模板Public delegate void ReceiveMsgEventHandled(object sender,clsTcpMsgEventArgs e);//定义事件private event ReceiveMsgEventHandler ReceiveMsgEvent;//公有事件,注册事件Public event ReceiveMsgEve...
阅读全文
摘要:在web开发经常会遇到如: 这样的字符。它其实是Html将一些特殊字符(Html语法字符)的一种表达方式。下面列举几个常用字符: 空格& &< <> >" "&qpos; '
阅读全文
摘要:在网页中经常遇到要设置默认按钮,是在Html的form标签中设置。<form id="form1"defaultbutton="buttion1" //默认按钮 defaultfocut="test1" //默认焦点runat="server">
阅读全文
摘要:Coolite中GridPanel自带的分页与GridView的分页一样,都是把所有数据全部读出放至内存中。本文使用数据库中储存过程的方式与GridPanel配合完成,每次访问仅读出分页的数据。前台: <ext:Store ID="Store1" OnRefreshData="Store1_RefershData" runat="server" AutoLoad="true"> <...
阅读全文
摘要:我在做弹出模态窗体时遇到了IE缓存问题。原因是更新后应得从数据库取新的数据,因为有缓存IE第二次以后便不回服务器了。所以取得的数据永远是第一次加载的数据,这是不行的。我的方法在Url地址上加随机数来避免缓存。javaScript 获取随机数方法如下:Math.floor(Math.random() * (n + 1));n为随机数的上限。如想取0~1000的随机数则:Math.floor(Math...
阅读全文
摘要:FCKeditor 与 <base target="_self"/> 导至“无法打开Internet站点”错误问题:弹出模式窗口:"window.showModalDialog('KnowledgeEdit.aspx?Action=Edit&Text='+ '' + '','添加知识','dialogWidth:900px;dialogHeight:60...
阅读全文
摘要:javascript有两种数据类型的转换方法:(一)将整个值从一种类型转换为另一种数据类型(称作基本数据类型转换)(二)从一个值中提取另一种类型的值,并完成转换工作基本数据类型转换的三种方法:1.转换为字符型:String(); 例:String(678)的结果为"678"2.转换为数值型:Number(); 例:Number("678")的结果为6783.转换为布尔型:Boolean(); 例:...
阅读全文
摘要:Coolite 中的ComboBox控件示例,这里写出几个常用方法:一、基本用法:<ext:ComboBox ID="cboSelectCol" runat="server" AllowBlank="false" Editable="false"FieldLabel="检索条件" EmptyText="请选择检索条件" ><Items><ext:ListItem Te...
阅读全文
摘要:一、条件语句:if(条件){ //执行语句 }else if{条件}{ //执行语句 }else{ //执行语句 }int i=0;swith(i){ case 0: //执行语句 break; case 1: //执行语句 break; default: //都不满足则执行此语句 break;}二、循环语句:for(int i=0;i<10;i++...
阅读全文
摘要:WebBrowser控件使用详解方法说明 GoBack相当于IE的“后退”按钮,使你在当前历史列表中后退一项 GoForward相当于IE的“前进”按钮,使你在当前历史列表中前进一项 GoHome相当于IE的“主页”按钮,连接用户默认的主页 GoSearch相当于IE的“搜索”按钮,连接用户默认的搜索页...
阅读全文
摘要:'主板蜂鸣'' Beep'' VB声明' Declare Function Beep Lib "kernel32" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long' 说明' 用于生成简单的声音' 返回值' Long,TRUE(非零)表示成功,否则返回零。会设置GetLastError' 参数表' 参数 类型及说明' dwFreq L...
阅读全文
摘要:一、重启mysql服务 在开始运行窗口输入如下命令 关闭mysql服务 net stop mysql 起动mysql服务 net start mysql二、MySQL 数据库文件的默认路径 在my.ini文件中 datadir="f:/lamp/MySQL Server 5.1/Data/"三、Appache web根目录的默认路径 在httpd.conf文件中 <Di...
阅读全文
摘要:1.logo图片 \themes\ClassicSugar\images\company_logo.png2.登陆图片\images\middle-bg.gif3.默认主题\config.php'default_theme' => 'ClassicSugar'4.不显示选择主题\login.php位置:<td align=right>主题:</td><td>...
阅读全文
摘要:libraries/select_lang.lib.php 1、找到有"zh-gb2312"的那一行,把'zh-gb2312' 改成 'zh-gb2312-utf-8'2、找到"$mysql_charset_map = array("那一行 把'gb2312' => 'gb2312', 改成 'gb2312' => 'latin1', 并将所有'latin1'注释掉 保存,OK...
阅读全文
摘要:winXP 默认情况下是不搜索 扩展名为php的文件中的内容解决方案:创建一个*.reg文件。用文本打开将下面代码粘贴至其中,保存后执行即可。Windows Registry Editor Version 5.00[HKEY_CLASSES_ROOT\.php\PersistentHandler]@="{5e941d80-bf96-11cd-b579-08002b30bfeb}"
阅读全文
摘要:一.下载相关软件 软件 下载地址httpd-2.2.15-win32-x86-no_ssl.msi http://httpd.apache.org/download.cgimysql-5.1.46-win32.msi http://dev.mysql.com/downloads/php-5.2.13-Win32.zip http://www.php.net/downloads.phpphpMyAd...
阅读全文
摘要:本文是学习了黄忠成老师的《决战.net -.net framework 3.5》书中 LINQ To DataTable 的相关章节,并应用到自己的项目中,发现很受用,所以将其中几个示例,拿出来分享一下。 如果在项目遇到这样的问题如:DataTable1和DataTable2需要根据一定的规则进行合并成一个DataTable3。问题1:DataTable1不是读数据库表的结果,而是合成的数据集,...
阅读全文
摘要:静态方法:using System;using System.Collections;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data;using System.Data.SqlClient;using System.Reflection;Public static Data...
阅读全文
摘要:效果图:前台部份:<ext:Store ID="Store1" runat="server" AutoLoad="false" > <Reader> <ext:JsonReader ReaderID="id"> <Fields> <ext:RecordField Name="id" Type="String" Mapping="id" />...
阅读全文
摘要:1.将FCK加入到系统中 (1)工程引用FredCK.FCKeditorV2.dll (2)将fckeditor文件夹考至工程目录下 (3)在页面上写<FCKeditorV2:FCKeditor ID="fckHtmlEditor" runat="server" Height="600" Width="880"/>后台取值: string str=this.fckHtml...
阅读全文
摘要:有两种方式:.net wsdl文件用法(一)工程—引用Web服务 添写wsdl文件地址,单击前往,修改命名空间,确定。 命名空间.WebService名称.FileServiceClient fs = new 命名空间.WebService名称.FileServiceClient();//实例化webservice客户端对象(二)通过WSDL文件自动生成类-WebService ...
阅读全文
摘要:用MySQLDriverCS连接MySQL数据库 先下载和安装MySQLDriverCS,地址: http://sourceforge.net/projects/mysqldrivercs/ 在安装文件夹下面找到MySQLDriver.dll,然后将MySQLDriver.dll添加引用到项目中 注:我下载的是版本是 MySQLDriverCS-n-EasyQueryTools-4.0.1-Dot...
阅读全文
摘要://读Xml至DataTable private void butInputXml_Click(object sender, EventArgs e) { DataSet ds = new System.Data.DataSet(); ds.ReadXml(this.txtXmlFile.Text); DataTable dt = ds.Tables[0]; this.dataGridVie...
阅读全文
摘要:using System;using System.Text;using System.Net.Sockets;using System.Net;namespace myClass{ class clsListenPort { #region 使用说明 /* 用途:监听某IP,指定端口,捕获通过此端口的消息。 举例: private delegate void ListenPostModel(st...
阅读全文
摘要:C# 控件的缩写1 btn Button 2 chk CheckBox 3 ckl CheckedListBox 4 cmb ComboBox 5 dtp DateTimePicker 6 lbl Label 7 llb LinkLabel 8 lst ListBox 9 lvw ListView 10 mtx MaskedTextBox 11 cdr MonthCalendar 12 icn N...
阅读全文
摘要:WebUserControl.ascx.cs 文件public delegate void myDelegate(string a,string b); public event myDelegate EventRefresh; private string _客户id; private string _录音编号; public string p_客户id { set { _客户id = valu...
阅读全文
摘要:在webform上实现走马灯效果 前台:<MARQUEE.stop().start() scrollamount=1 scrolldelay=1 direction= left border="1" style="width: 31%; height: 16px;"><%=Structure%></MARQUEE> 后台:public string Struct...
阅读全文
摘要:在Ajax Control Toolkit控件包中,发现CalendarExtender日历控件,只要把控件拖入就能够使TextBox弹出日期选择。可显示的都是英文。解决方案:在<asp:ScriptManager>控件里设置两个属性,如:<asp:ScriptManager EnableScriptGlobalization=true EnableScriptLocalizat...
阅读全文
摘要:在webform开发中难免会遇到将GrilView中的数据转换成DataTable,下面的类将实现这个功能,但仅是显示出来的数据,如有分页得另行处理。 using System;using System.Collections.Generic;using System.Text;using System.Web.UI.WebControls;using System.Data;using Syst...
阅读全文
摘要:基本用法:<frameset rows="20%,*"> <!--水平划分的第一个部分加载sample25_top.htm文件--> <frame src="sample_top.htm" name="top"> <!--水平划分的第二个部分并没有加载文件,是再垂直划分为两个部分--> <frameset cols="30%,*">...
阅读全文
摘要:在Asp.net 中Cookie的用法 protected void Page_Load(object sender, EventArgs e) { HttpCookie cookie = new HttpCookie("aspcn");//声明 Response.AppendCookie(cookie); } protected void Button1_Click(object sender,...
阅读全文
摘要:以下是html调用示例,ClassID为用vb自带的打包工具,打包获得的。<html><br><OBJECT ID="CtiClient"CLASSID="CLSID:FA2B1B95-359E-4320-BAB5-286450B9D863"CODEBASE="Cti_Client1100504.CAB#version=1,0,0,8"></OBJECT&...
阅读全文