master
editor 2 months ago
commit 40208ef64d

@ -0,0 +1,36 @@
GRIDVIEW实用示例源码附加导出EXCEL功能
一、源码描述
环境VS2022 sql2019
二、功能介绍
VS2005中GridView的自定义分页单选、多选、排序、自增列及可以导出Excel的简单应用源码
多选时,只有全部选中时“多选”才选中
数据库文件在DB_51Aspx文件夹中附加即可
三、注意事项
1、在项目web.config修改数据库连接字符串附加数据库。
2、ctrl+F5运行即可。
作者: 51aspx
如需获得该源码的视频、更新等更多资料请访问: https://www.51aspx.com/Code/GridViewDemo
------------------------------------------------------------------------------------------------
源码服务专家
官网: https://www.51aspx.com
讨论圈: https://club.51aspx.com/
平台声明:
1.51Aspx平台上提供下载的资源为免费、共享、商业三类源码,其中免费和共享源码仅供个人学习和研究使用,商业源码请在相应的授权许可条件下使用;
2.51Aspx平台对提供下载的软件及其它资源不拥有任何权利,其版权归属源码合法拥有者所有;
3.著作权人发现本网站载有侵害其合法权益的内容或作品,请与我们联系( 登录官网与客服反馈或发送邮件到support@51Aspx.com
4.51Aspx平台不保证提供的下载资源的准确性、安全性和完整性;
友情提示:
一般数据库文件默认在 DB_51Aspx 文件夹下
默认账号密码一般均为51Aspx
关于源码使用常见问题及解决方案,请参阅: https://www.51aspx.com/Help

@ -0,0 +1,15 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="GridViewDemo._Default" EnableEventValidation="false" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>51aspxGridViewӦ<77><D3A6>ʵ<EFBFBD><CAB5></title>
<script language="javascript" type="text/javascript">
// <20>ж϶<D0B6>ѡ<EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD>û<EEA3A8><C3BB>ѡ<EFBFBD>еķ<D0B5><C4B7><EFBFBD>false<73><65>
function slcNo_click()
{
if (document.form1.checkboxname.length)
{
for (var i=0;i<document.form1.checkboxname.length;i++)
{

@ -0,0 +1,15 @@
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using System.IO;
namespace GridViewDemo
{

@ -0,0 +1,15 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.42
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace GridViewDemo {
/// <summary>
/// _Default class.

@ -0,0 +1,15 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{038EC2B9-9581-4AD8-9BCA-3045D19B8E14}</ProjectGuid>
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>GridViewDemo</RootNamespace>
<AssemblyName>GridViewDemo</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>

@ -0,0 +1,15 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("GridViewDemo")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("chuguo")]
[assembly: AssemblyProduct("GridViewDemo")]
[assembly: AssemblyCopyright("Copyright © chuguo 2007")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

@ -0,0 +1,15 @@
<?xml version="1.0"?>
<configuration>
<appSettings/>
<connectionStrings>
<add name="Conn51aspx" connectionString="SERVER=(local);DATABASE=GridViewDB;UID=sa;pwd=sasasa" />
</connectionStrings>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.

@ -0,0 +1,15 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="GridViewDemo._Default" EnableEventValidation="false" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>51aspxGridViewӦ<77><D3A6>ʵ<EFBFBD><CAB5></title>
<script language="javascript" type="text/javascript">
// <20>ж϶<D0B6>ѡ<EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD>û<EEA3A8><C3BB>ѡ<EFBFBD>еķ<D0B5><C4B7><EFBFBD>false<73><65>
function slcNo_click()
{
if (document.form1.checkboxname.length)
{
for (var i=0;i<document.form1.checkboxname.length;i++)
{

@ -0,0 +1,15 @@
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using System.IO;
namespace GridViewDemo
{

@ -0,0 +1,15 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.42
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace GridViewDemo {
/// <summary>
/// _Default class.

@ -0,0 +1,15 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{038EC2B9-9581-4AD8-9BCA-3045D19B8E14}</ProjectGuid>
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>GridViewDemo</RootNamespace>
<AssemblyName>GridViewDemo</AssemblyName>
<FileUpgradeFlags>
</FileUpgradeFlags>

@ -0,0 +1,15 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("GridViewDemo")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("chuguo")]
[assembly: AssemblyProduct("GridViewDemo")]
[assembly: AssemblyCopyright("Copyright © chuguo 2007")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

@ -0,0 +1,15 @@
<!DOCTYPE html>
<!-- saved from url=(0014)about:internet -->
<html xmlns:msxsl="urn:schemas-microsoft-com:xslt"><head><meta content="en-us" http-equiv="Content-Language" /><meta content="text/html; charset=utf-16" http-equiv="Content-Type" /><title _locID="ConversionReport0">
Migration Report
</title><style>
/* Body style, for the entire document */
body
{
background: #F3F3F4;
color: #1E1E1F;
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
padding: 0;
margin: 0;
}

@ -0,0 +1,15 @@
<?xml version="1.0"?>
<configuration>
<appSettings/>
<connectionStrings>
<add name="Conn51aspx" connectionString="SERVER=.;DATABASE=GridViewDB;UID=sa;pwd=51Aspx"/>
</connectionStrings>
<!--
For a description of web.config changes see http://go.microsoft.com/fwlink/?LinkId=235367.
The following attributes can be set on the <httpRuntime> tag.
<system.Web>
<httpRuntime targetFramework="4.8" />
</system.Web>
-->
<system.web>
Loading…
Cancel
Save