易截截图软件、单文件、免安装、纯绿色、仅160KB

ASP.NET数据绑定_第四篇_用SqlDataSource控件绑定_01

+++ 页面代码如下:
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
    AutoGenerateColumns="False" DataKeyNames="username" DataSourceID="SqlDataSource1"
    PageSize="3">
    <Columns>
        <asp:BoundField DataField="username" HeaderText="用户名" SortExpression="username" ReadOnly="true" />
        <asp:BoundField DataField="userpwd" HeaderText="密码" SortExpression="userpwd" />
        <asp:CommandField ShowEditButton="True"/>
        <asp:CommandField ShowDeleteButton="True"/>
    </Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
    ConnectionString="Data Source=ora9;User ID=scott;Password=tiger;Persist Security Info=True"
    ProviderName="System.Data.OracleClient"
    SelectCommand="SELECT USERNAME, USERPWD from USERS"
    UpdateCommand="UPDATE USERS SET USERPWD =:userpwd where USERNAME = :username"
    DeleteCommand="DELETE from USERS where USERNAME =:username">
    <UpdateParameters>
        <asp:ControlParameter ControlID="GridView1" DefaultValue="username" Name="username"
            PropertyName="SelectedValue" />
        <asp:ControlParameter ControlID="GridView1" DefaultValue="userpwd" Name="userpwd"
            PropertyName="SelectedValue" />
    </UpdateParameters>
    <DeleteParameters>
        <asp:ControlParameter ControlID="GridView1" Default


相关文档:

asp.net合并excel

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.OleDb; //导入命名空间
using System.IO;
using Excel = Microsoft.Office.Interop.Excel;
using System.Reflection;
using System.Data;
usi ......

ASP.NET 页面间传值

在页面间跳转,会涉及到值和数据的传递问题.特用本文将我知道的一些方法归纳一下.
1.带参数传递
优点:使用方便
缺点:安全性低,适合传递简单类型的对象,比如数字.字符.但对对象.数组等不合适传递.
应用:
a.安全性不高,应对方式:对传递的值进行加密.
b.传递简单类型的对象.应对方式:在传递页通过简单类型对象给出标识,在 ......

Asp.Net Web Form 调用Reporting Service

1、aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TransferMoney.aspx.cs" Inherits="BtmsWebApp.report.TransferMoney" MasterPageFile="~/ReportPage.master" %>
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d5 ......

ASP.NET Cache_第二篇_如何向缓存中添加缓存项

+++ 你可以在应用程序中使用Cache对象访问缓存项。使用Cache对象的Insert方法将一个缓存项添加到应用程序缓存中,该方法有很多重载方法,让你用不同的缓存策略将一个缓存项添加到缓存中。
+++ 如果你用Insert方法向缓存中添加缓存项,并且缓存中存在同名缓存项,那么,缓存中的同名缓存项将被替换(覆盖)。
+++ 你也可以 ......

ASP.NET数据绑定_第一篇_概述

+++ 事实上,将数据集绑定到.NET控件,就是将数据库的表或表中某个字段读到内存的某个结构里,比如DataTable,然后把这个数据结构绑定到.NET控件。
+++ 如果你以前使用过C++ Builder或是Delphi,那么你一定记得,绑定数据库控件与一般控件是分开的,这两种控件在不同的包中。而现在的.NET控件就非常灵活,它既可以作为一般 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号