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

ASP.NET实现增删改查等功能(Access版)系统之五 更新

更新方法一,直接在GridView中来更新数据.
更新方法二,打开一个新的页面来更新数据.
//更新
    protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
    {
        GridView1.EditIndex = e.NewEditIndex;
        //PopulatePublishersGridView();
        string sqlstr = getSQlStr();
        bind(sqlstr);
    }
 
//更新
    protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
    {
        OleDbConnection sqlcon = new OleDbConnection(GetConnection());
     
        string sqlstr = "update XJ_WY_ZZ set ZZYear='" + ((TextBox)(GridView1.Rows[e.RowIndex].Cells[4].Controls[0])).Text.ToString().Trim()
             + "',XqGaiZaoYear='" + ((TextBox)(GridView1.Rows[e.RowIndex].Cells[5].Controls[0])).Text.ToString().Trim()
             + "',DanYuanShu='" + ((TextBox)(GridView1.Rows[e.RowIndex].Cells[6].Controls[0])).Text.ToString().Trim()
              + "',CengGao='" + ((TextBox)(GridView1.Rows[e.RowIndex].Cells[7].Controls[0])).Text.ToString().Trim()
             + "',JuMinHuShu='" + ((TextBox)(GridView1.Rows[e.RowIndex].Cells[8].Controls[0])).Text.ToString().Trim()
             + "',QiangTiJieGou='" + ((TextBox)(GridView1.Rows[e.RowIndex].Cells[9].Controls[0])).Text.ToString().Trim()
             + "',JianZhuMianJi='" + ((TextBox)(GridView1.Rows[e


相关文档:

asp.net的一个dbhelper类

using System;
using System.Collections;
using System.Collections.Specialized;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Collections.Generic;
using System.Text;
namespace Maticsoft.DBUtility
{
     /// <summary>
  ......

asp.net简体字转繁体字的类库

asp.net简体字转繁体字的类库
   这东西虽然简单,但也不失为经典的类库,个人而言,就非常喜欢这个类库。
   用文字记录下来吧,留个记念吧
   在vs中,有一个经典的Microsoft.VisualBasic.dll的VB类库,根据官方的描述:
   它能提供对许多 .NET Framework 类的简单直观的� ......

asp.net模态窗口使用

1 如何在提交后防止弹出新窗口
2 在模态窗口中再次弹出模态窗口
3 模态窗口返回值
4 刷新父窗口
5 父窗口如何添加刷新脚本
主窗口弹出一个模态窗口,
var firstDiag = window.showModalDialog(url,window,"center:yes;dialogWidth:300px;dialogHeight:400px");
注:在url文件的head加入 <base target='_self'> � ......

asp.net平台上连接数据库

 今天纠结了一上午的问题,于下午3点12分尘埃落定!
事情是这样的:
作为一个里程碑记录下吧,也算是我第一次将asp.net与数据库结合,并完成从软件编程到web的过渡。
在此感谢今天为我解决问题的“杀手”(也称老道),还有以前为我解决问题的大队、御风、华哥等牛...
言归正传,本文介绍一下怎样在asp. ......

在asp.net webservice中如何使用session

在使用asp.net编写webservice时,默认情况下是不支持session的,但我们可以把WebMethod的EnableSession选项设为true来显式的打开它,请看以下例子:
1 新建网站WebSite 
2 新建web服务WebService.asmx,它具有以下两个方法:
[WebMethod(EnableSession = true)]
public string Login(string name)
{
   ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号