SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["swosConnectionString"].ToString());
SqlCommand cmd = new SqlCommand("", con);
cmd.CommandText = "SELECT [ID], [tag] FROM [XsdnTag] where [abc]=@abc order by [order] desc";
//cmd.Parameters.AddWithValue("@ID", id);
//cmd.Parameters.Add("@abc", SqlDbType.NVarChar);
//cmd.Parameters["@abc"].Value = "sssss";
SqlParameter pText=new SqlParameter("@Text",mytext);
cmd.Parameters.Add(pText);
try
{
con.Open();
cmd.ExecuteNonQuery();
//SqlDataReader dr = cmd.ExecuteReader();
//while (dr.Read())
//{
// ddddd = dr["ID"].ToString();
//}
//dr.Close();
}
catch (Exception ex)
{
zErrorLog.catchError(Request.Url.ToString(), ex.Message);
}
finally
{
con.Close();
}
OleDbConnection con = new OleDbConnection(ZhijiangSystem.Properties.Settings.Default["localDBConnectionString"].ToString());
OleDbConnection con = new OleDbConnection(ConfigurationManager.ConnectionStrings["ConnectionStringXSSP"].ToString());
OleDbCommand cmd = new OleDbCommand("", con);
try
{
con.Open();
cmd.CommandText = "update [BlogCatalog] set [order] = ? where [ID] = ?";
cmd.Parameters.AddWithValue("@ID", id);
cmd.Parameters.Add("@aaaaa", OleDbType);
cmd.Parameters["@aaaaa"].Value = aaaaa;
cmd.ExecuteNonQuery();
//OleDbDataReader dr = cmd.ExecuteReader();
//while (dr.Read())
//{
// ddddd = dr["ID"].ToString();
//}
//dr.Close();
DataSet customersSet = new DataSet();
DataTable customersTable = null;
OleDbDataAdapter sda = new OleDbDataAdapter("SELECT * FROM Customers", "Data Source=localhost;Integrated Security=SSPI;Initial Catalog=Northwind;");
sda.Fill(customersTable);
customersTable = customersSet.Tables[0];
}
catch (Exception ex)
{
zErrorLog.catchError(Request.Url.ToString(), ex.Message);
}
finally
{
con.Close();
zCountQueries.plusOnce();
}
===========sql2005===========
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[sp_Get_NewsList]--返回新闻列表
(@NodeID int=null,
@pageIndex int=null,
@pageSize int)
AS
BEGIN
with Tmptable as (
SELECT ROW_NUMBER() OVER (ORDER BY IfPeak desc, ModifyDate desc) AS RowNo,NewsID,Title,AddDate,IfLink,HtmlNews,HomePic from T_News where NodeID=@NodeID )
SELECT * FROM Tmptable where RowNo between (@pageIndex-1)*@pageSize+1 and (@pageIndex-1)*@pageSize+@pageSize
END
===========sql2000===========
ALTER PROCEDURE [dbo].[sp_Get_NewsList]--返回新闻列表
(@NodeID int=null,
@pageIndex int=null,
@pageSize int)
AS
set nocount on
BEGIN
declare @indextable table(id int identity(1,1),nid int)
declare @PageLowerBound int
declare @PageUpperBound int
set @PageLowerBound=(@pageIndex-1)*@pageSize
set @PageUpperBound=@PageLowerBound+@pageSize
set rowcount @PageUpperBound
insert into @indextable(nid)
select NewsID from T_News where NodeID=@NodeID ORDER BY IfPeak desc, ModifyDate desc
select NewsID,Title,AddDate,IfLink,HtmlNews,HomePic from T_News O,@indextable t
where O.NewsID=t.nid and t.id
between @PageLowerBound+1 and @PageUpperBound order by t.id
END
set nocount off
下载地址 ftp://xuexi:xuexi123456@218.246.23.98/VS2005.rar
新增地址 ftp://thc123_net:thc123_com@220.113.41.144/thcvs2005.rar
附上天轰穿主页:
设置目录权限
network service
SQL Server 外围应用配置器:
-服务和连接的外围应用配置器
-远程连接
-同时使用 ICP/IP 和 named pipes
SQL Server Management Studio:
-Windows 身份验证 登录
-本机服务器右键属性
-安全性 改验证模式
-登录名 可用sa,可新建 状态 设置登录启用
本文所述部署 DotNetTextBox 的版本为:免费开源版 3.4.1,仅供参考!
引用dll:
ActiproSoftware.CodeHighlighter.Net20.dllActiproSoftware.Shared.Net20.dll
CodeHighlighterTest.dll
DotNetTextBox.dll
EnvDTE.dll
Interop.Word.dll
Microsoft.Vbe.Interop.dll
Office.dll
Word_dntb.dll
调用方法:
1.直接在ASPX页面引用控件的话,请将 DotNetTextBox.dll 复制到页面所在项目的 bin 目录下,并在web.config 的 pages -> controls 节点加:
<add tagPrefix="DNTB" namespace="DotNetTextBox" assembly="DotNetTextBox"/>在需要加入控件的地方添加:
<DNTB:WebEditor ID="WebEditor1" runat="server" systemFolder="system_dntb/" Skin="skin/XP/" PathType="AbsoluteRoot" />上面设置了我默认的属性。
2.将默认属性写在 appSettings 里,可以不做。
3.添加控件到VS的工具箱,可以不做。
4.将 system_dntb 目录拷贝到所在项目里。
5.将控件 bin 目录里的 ActiproSoftware.CodeHighlighter.Net20.dll、ActiproSoftware.Shared.Net20.dll、CodeHighlighterTest.dll 拷贝到项目 BIN 目录里(如果不需要代码高亮功能,删除 system_dntb 目录里的 PasteCode.aspx 和 PasteCode.aspx.cs 页面就可以不拷贝这三个 DLL 文件)
6.web.config 中设置 codeHighlighter
configSections中加入:
<section name="codeHighlighter" requirePermission="false" type="ActiproSoftware.CodeHighlighter.CodeHighlighterConfigurationSectionHandler, ActiproSoftware.CodeHighlighter.Net20"/>加入以下代码为二级节点:
<codeHighlighter>
<cache languageTimeout="3"/>
<keywordLinking enabled="true" target="_blank" defaultKeywordCollectionKey="ActiproKeywords">
<keywordCollection key="ActiproKeywords">
<explicitKeyword tokenKey="IdentifierToken" patternValue="Actipro" url="http://www.actiprosoftware.com" caseSensitive="false"/>
<explicitKeyword tokenKey="IdentifierToken" patternValue="CodeHighlighter" url="http://www.codehighlighter.com" caseSensitive="false"/>
</keywordCollection>
</keywordLinking>
<languages>
<language key="Assembly" definitionPath="~/system_dntb/Lexers/ActiproSoftware.Assembly.xml"/>
<language key="BatchFile" definitionPath="~/system_dntb/Lexers/ActiproSoftware.BatchFile.xml"/>
<language key="C#" definitionPath="~/system_dntb/Lexers/ActiproSoftware.CSharp.xml"/>
<language key="CSS" definitionPath="~/system_dntb/Lexers/ActiproSoftware.CSS.xml"/>
<language key="HTML" definitionPath="~/system_dntb/Lexers/ActiproSoftware.HTML.xml"/>
<language key="INIFile" definitionPath="~/system_dntb/Lexers/ActiproSoftware.INIFile.xml"/>
<language key="Java" definitionPath="~/system_dntb/Lexers/ActiproSoftware.Java.xml"/>
<language key="JScript" definitionPath="~/system_dntb/Lexers/ActiproSoftware.JScript.xml"/>
<language key="Lua" definitionPath="~/system_dntb/Lexers/ActiproSoftware.Lua.xml"/>
<language key="MSIL" definitionPath="~/system_dntb/Lexers/ActiproSoftware.MSIL.xml"/>
<language key="Pascal" definitionPath="~/system_dntb/Lexers/ActiproSoftware.Pascal.xml"/>
<language key="Perl" definitionPath="~/system_dntb/Lexers/ActiproSoftware.Perl.xml"/>
<language key="PHP" definitionPath="~/system_dntb/Lexers/ActiproSoftware.PHP.xml"/>
<language key="PowerShell" definitionPath="~/system_dntb/Lexers/ActiproSoftware.PowerShell.xml"/>
<language key="Python" definitionPath="~/system_dntb/Lexers/ActiproSoftware.Python.xml"/>
<language key="SQL" definitionPath="~/system_dntb/Lexers/ActiproSoftware.SQL.xml"/>
<language key="VB.NET" definitionPath="~/system_dntb/Lexers/ActiproSoftware.VBDotNet.xml"/>
<language key="VBScript" definitionPath="~/system_dntb/Lexers/ActiproSoftware.VBScript.xml"/>
<language key="XAML" definitionPath="~/system_dntb/Lexers/ActiproSoftware.XAML.xml"/>
<language key="XML" definitionPath="~/system_dntb/Lexers/ActiproSoftware.XML.xml"/>
</languages>
<lineNumberMargin foreColor="Teal" paddingCharacter=" " visible="true"/>
<outlining enabled="true" imagesPath="~/system_dntb/OutliningIndicators/"/>
<spacesInTabs count="4"/>
</codeHighlighter>7.在使用的页面需要设置page: ValidateRequest="false" EnableEventValidation="false"
8.搜索 id 为 OutliningEnabledCheckBox 的单选框,更改默认 Checked="true",显示行号也可以改为选中,不过这样不方便读者复制代码使用。
另外提醒一点,DotNetTextBox 在 UpdatePanel 中使用时,回传后会丢失内容,使用时注意。
下载最新的免费CodeHighlighter组件 http://www.CodeHighlighter.com
1。确保web.config中的languages节点的.xml文件路径正确。
2。可以在insertCode.aspx更改编辑的默认设置,如checkbox的check等。(或在项目中搜索相关代码)
DotNetTextBox 已集成CodeHighlighter,我的修改如下:
SyntaxHighlighter is here to help a developer/coder to post code snippets online with ease and have it look pretty. It's 100% Java Script based and it doesn't care what you have on your server.

http://cutesoft.net
http://www.cuteeditor.cn/
下载最新版CuteEditor
发布网站后如果提示:
无法为类型 CuteEditor.Editor 授予有效的许可证
则搜索此句,可找到解决办法:
下载CuteEditor.lic覆盖即可
将 Windows\Temp 目录的权限 Network Service 帐户赋予了完全控制的权限
出错快照:
“/”应用程序中的服务器错误。
编译错误
说明: 在编译向该请求提供服务所需资源的过程中出现错误。请检查下列特定错误详细信息并适当地修改源代码。
编译器错误消息: CS0016: Could not write to output file 'c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\138641eb\e8d016c8\App_Web_default.aspx.bb4e7940.re_hlwux.dll' -- '拒绝访问。 '