ASP.NET
文章平均质量分 67
llwen218
这个作者很懒,什么都没留下…
展开
-
在ASP.NET(C#)中调用周销售记录存储过程
创建一个名为DynamicSalesByWeek的ASP.NET (C#)程序,把WebForm1.aspx改为default.aspx,创建一个名为DataTier的类库,把Class1.cs改名为DataTier.cs,在Web.config增加要增加连接的数据库名称。default.aspx的全部内容如下: Dynamic Sales by Week原创 2006-09-07 14:16:00 · 1489 阅读 · 0 评论 -
Using the ASP.NET Starter Kits
The ASP.NET Starter Kits illustrate a number of best practices for building applications using the ASP.NET Framework. There are five Starter Kits: The Community Starter Kit, the Reports Starter Kit, t原创 2006-06-01 16:34:00 · 1788 阅读 · 1 评论 -
ADO.NET简介
ADO.NET包括以下几个命名空间: System.Data.SqlClient— Contains classes for connecting to Microsoft SQL Server version 7.0 or higher System.Data.OleDb— Contains classes for connecting转载 2006-06-03 20:06:00 · 756 阅读 · 0 评论 -
提高数据库性能的两种方式
数据库访问性能的两种方式:使用存储过程和缓冲池POOLING。使用存储过程在ASP.NET中,你可以使用两种方式执行SQL语句直接在页面执行代码,或者封装SQL语句然后再执行。使用存储过程可以提高应用程序的性能和可维护性;封装多个SQL语句,然后成组执行,比如,你可以创建一个存储过程包含多个SQL UPDATE语句,一次执行修改多个记录;TSQL支持参数、条件、循环和函数,使用这些原创 2006-06-03 20:48:00 · 1144 阅读 · 0 评论 -
在DataGrid中产生一个递增的数字列
在DataGrid---->属性生成器---->-添加一个列,在“数据字段”里面写“RowNumber”,在“页眉文本”里面写“序号”,然后在代码中添加: SqlConnection conn = new SqlConnection(strConn); DataSet ds = new DataSet(); SqlDataAdapter da = new SqlDat原创 2006-06-05 10:03:00 · 672 阅读 · 0 评论 -
打印大全,Web中打印终极秘籍
http://schemas.microsoft.com/intellisense/ie5"> 看看 .Noprint{display:none;} .PageNext{page-break-after: always;} .tdp { bo转载 2006-06-07 15:58:00 · 822 阅读 · 0 评论 -
一个通用的交叉制表存储过程
原作者:John Papa, Matthew Shepker 1999 整理: 水如烟(http://blog.csdn.net/lzmtw) 2005-5-1 示例: Use pubs GO exec prCrosstab stor_id,ord_date,qty,sales,1,5 结果:转载 2006-06-13 16:43:00 · 929 阅读 · 0 评论 -
DataGrid使用中的一些常用代码
在页眉添加图片和文字The HeaderImageUrl property displays an image for a header. The image is not displayed in the background, so you cannot combine the HeaderImageUrl property with the HeaderText property原创 2006-06-06 22:04:00 · 709 阅读 · 0 评论 -
Using DataSets with ASP.NET Pages
如果使用正确,DataSets能戏剧性地提高你Web站点的性能,然而,如果使用不正确,DataSets会浪费宝贵的服务器资源并降低Web Site的性能。为了更好地使用DataSets,DataSets可以被cache在存储器中,响应来自同样的或是不同的页面多个请求Caching DataSets 你可以通过cache对象来缓存DataSet,DataTable或者DataVi翻译 2006-06-06 23:16:00 · 637 阅读 · 0 评论 -
在 Web 上打印的一些方法
一、利用IE内部打印组件: 这个方案也许是最简单的,当然不会很“专业”。我们假设客户端是IE6.0版本,因为在IE6.0中才完全体现我们所要应用的“打印模板机制”。它在精确控制页面边界,文本间隔,以及打印的统一性上,功能更为完备。 至于这种方案的实现也相当简单,它主要只涉及到DEVICERECT,LAYOUTRECT两种行为方式,分别用来定义整体页面风格及单个页面内容风转载 2006-06-07 15:39:00 · 2175 阅读 · 1 评论 -
利用CSS控制打印
@media print{INPUT {display:none}}每页都有的表头表格内容表格内容表格内容表格内容表格内容表格内容表格内容表格内容表格内容表格内容表格内容表格内容表格内容表格内容表格内容表格内容表格内容表格内容表格内容表格内容表格内容表格内容表格内容表格内容表格内容表格内容表格内容表格内容表格内容表格内容表格内容表格内容表格内容表格内容表格内容表格内容表格内容表格内容表格内容表格内转载 2006-06-07 18:03:00 · 692 阅读 · 0 评论 -
web默认站点启动不了
错误提示:服务并未及时响应启动或控制请求解决办法:1.启动 event log 2.然后启动World Wide Web Publishing Service 以前优化系统的时候习惯把event log禁掉,没想到竟然和IIS有关系。如果禁掉,World Wide Web Publishing Service会启动不了,报错:发生错误 1717原创 2006-07-03 10:00:00 · 1636 阅读 · 0 评论 -
如何让treeview默认不选中
修改“TreeView.cs”源码,取消 TreeView 默认选中节点1、TreeView.cs 文件在文中﹐找到 “ protected override void OnLoad(EventArgs e)”事件“ protected override void OnPreRender(EventArgs e)” 事件,修改以下代码 if ((SelectedNodeIndex == "" ||转载 2006-07-03 10:06:00 · 6267 阅读 · 0 评论 -
封装的ADO.NET对数据库操作经典类
using System;using System.Collections;using System.Collections.Specialized;using System.Runtime.Remoting.Messaging;using System.Data;using System.Data.SqlClient;using System.Configuration;namespace转载 2006-07-17 16:41:00 · 776 阅读 · 0 评论 -
动态生成控件
Adding Controls to a PageYou can add new controls to a page by adding the controls to a pages Controls collection. You can add a control at the end of the Controls collection by using the Add() met原创 2006-05-31 15:00:00 · 802 阅读 · 0 评论 -
使用验证控件
People really like client-side validation. It looks great and creates a better overall user experience. The problem, however, is that it does not work with all browsers. Not all browsers support JavaS原创 2006-05-28 22:43:00 · 993 阅读 · 1 评论 -
.NET开源社区
.NET开源社区 dnn GotDotnet(MS官方开源项目的集散地) codeproject原创 2006-04-29 11:57:00 · 1276 阅读 · 0 评论 -
How to use ,,,,
:be used to simple bind data,equal to DataBinder.Eval(Container.DataItem,""),the web.config s configuration information,in asp.net 2.0 version:be used to define the page information or to imp原创 2006-04-29 10:43:00 · 608 阅读 · 0 评论 -
.Net Petshop详解(二)
交互的三层综述 在前面的文章中,我们丛整个系统的角度了解了petshop的三层部署结构物理上的一个概貌,没有从应用程序的角度来说明是如何划分的,也不清楚数据展示层,中间层,数据层是如何交互的。为了更好的说明这个三层的结构以及每一层的具体细节问题,也让大家对整个应用有一个walkthrough,在这里我将说明从系统的角度来看(见参考图1),顾客在购物的过程中,系统的三层是如何的工作以及如何的转载 2006-05-02 16:11:00 · 712 阅读 · 0 评论 -
.Net Petshop详解(一)
前言 Microsoft公司为了配合推出.NET战略,不仅发布了一系列的开发工具和开发平台,同时还推出了.NET平台上的示范应用.其中的.Net Petshop就是极好的一例.这个电子商务的开发应用是为了应对J2EE平台而出炉的,在J2EE平台上Sun公司也有一个完整的实例----J2EE Petstore,它体现J2EE的BluePrint。二者解决的问题是一样的,功能也大同小异,界面也转载 2006-05-02 16:08:00 · 849 阅读 · 0 评论 -
动态绑定dropdownlist
说来,很多的dropdownlist选项都不是固定的,是会动态改变的,一种方法是在页面上写死,改变时,直接修改页面就可以了。但是很多人是使用动态绑定的,因此dropdownlist的Text和Value是需要动态生成的。 首先我们来创建一个表来存放DropDownList的菜单选项: create table DDLItem --下拉菜单选项表 ( id int Identity Primar转载 2006-05-02 16:17:00 · 760 阅读 · 0 评论 -
在DataGrid中创建排序列
/// /// 排序,首先设置BoundColumn中的SortExpression /// /// /// private void DataGrid1_SortCommand(object source, System.Web.UI.WebControls.DataGridSortCommandEventArgs e) { Session.Add("sorting",e原创 2006-05-27 17:53:00 · 744 阅读 · 0 评论 -
关于C#的网址
http://www.devcity.net/forums/forum.asp?fid=15 http://www.idautomation.com/sitemap/visual-basic.html http://www.devx.com/dotnet/Door/10587 http://www.uncj.net/news/show.aspx?id=102 ht转载 2006-05-28 11:24:00 · 966 阅读 · 0 评论 -
ViewState的使用
禁用控件的ViewState,设置控件的EnableViewState="False"即可;禁用Form的ViewState:;设置ViewState的值:ViewState( "SomeItem" ) = "Some Value";ViewState是区分大小写的,比如Response.Write( ViewState( "Count" ) )和Response.Write( ViewState原创 2006-05-28 23:16:00 · 1472 阅读 · 1 评论 -
DataGrid动态创建删除列,可以删除记录
private void Page_Load(object sender, System.EventArgs e) { //建立删除按钮列 ButtonColumn bc = new ButtonColumn(); bc.ButtonType = ButtonColumnType.PushButton; bc.Text = "删 除"; bc.CommandName = "d原创 2006-05-27 17:26:00 · 1377 阅读 · 0 评论 -
DataGrid颜色交替,删除确认,添加一个从1开始的递增列
private void DataGrid1_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e) { if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)原创 2006-05-27 17:47:00 · 1026 阅读 · 0 评论 -
动态创建控件
在页面上加一个PlaceHolder控件PlaceHolder1, for(int i=4;i { if(ds.Tables[0].Rows[0][i].ToString() == "1") //根据数据库中的值判断是否要添加 { TableRow tr = new TableRow();TableCell tc = new TableCell();/原创 2006-05-27 18:06:00 · 700 阅读 · 0 评论 -
ASP.NET TreeView Web Control 添加,删除,修改
在Visual Studio 2003 中,TreeView Web Control 默认是没有安装的,如果需要,可以到微软的官方网站下载,或是用搜索引擎查找,网上有很多。安装后,通过“自定义工具箱”-->”.net框架组件”把TreeView添加到工具箱里。 运行时无法显示 : 一般是TreeView的版本问题,最好下载英文版自动安装版本重新安装,安装前应该先到添加删除程序里卸掉原版原创 2006-05-28 08:37:00 · 3825 阅读 · 2 评论 -
好的asp.net网站和论坛
站点推荐 http://expert.csdn.net/Expert/topic/3008/3008621.xml?temp=8.143252E-02 1、ASP.Net中怎么样实现水晶报表在客户端打印? ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.2052/crystlmn/html/crconprintingrep转载 2006-05-28 11:32:00 · 6012 阅读 · 0 评论 -
使用Dundas Chart控件制作一个模拟的逼真图
使用Dundas Chart 组件开发如上图,以下代码是在VS2003开发环境中运行的。在页面中加一个Dundas Chart 组件,并在Page_Load中调用SetChart1()函数即可(参数在0-10之间赋值)。调用代码:private void Page_Load(object sender, System.EventArgs e) { if(!Page.原创 2007-01-25 14:02:00 · 7453 阅读 · 1 评论