求解:我在包含母版页的web窗体中写的GridView中运行效果出不来

这篇博客探讨了在ASP.NET Web窗体中,使用母版页时GridView显示和分页效果无法正常工作的问题。作者展示了前台的ASP.NET代码,包括TextBox、DropDownList、Button和GridView的设置,以及后台C#代码中加载数据和处理分页事件的方法。通过Page_Load和GridView1_PageIndexChanging事件处理,尝试实现查询和分页功能。
摘要由CSDN通过智能技术生成

前台

<%@ Page Title="" Language=“C#” MasterPageFile="~/Site1.Master" AutoEventWireup=“true” CodeBehind=“WebForm1.aspx.cs” Inherits=“UI.WebForm1” %><asp:Content ID=“Content1” ContentPlaceHolderID=“head” runat=“server”></asp:Content><asp:Content ID=“Content2” ContentPlaceHolderID=“ContentPlaceHolder1” runat=“server”> <asp:TextBox ID=“txtName” runat=“server”></asp:TextBox> <asp:DropDownList ID=“ddlGJ” runat=“server”></asp:DropDownList> <asp:Button ID=“btnCX” runat=“server” Text=“查询” /> <asp:GridView ID=“gvUser” runat=“server” AllowPaging=“True” AutoGenerateColumns=“False” PageSize=“3” OnPageIndexChanging=“GridView1_PageIndexChanging”> <asp:BoundField HeaderText=“编号” DataField=“Id”/> <asp:BoundField HeaderText=“姓名” DataField=“Name”/> <asp:BoundField HeaderT

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值