博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
20151217:Web之Repeater使用:主页面
阅读量:7082 次
发布时间:2019-06-28

本文共 1089 字,大约阅读时间需要 3 分钟。

主页面前台HTML代码:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="1217.aspx.cs" Inherits="_1217" %>
代号 名称 价格 产地 库存 操作
<%#Eval("Ids") %> <%#Eval("Name") %> <%#Eval("Price") %> <%#Eval("Source") %> <%#Eval("Numbers") %> ">删除 ">修改

后台C#代码:

using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;public partial class _1217 : System.Web.UI.Page{    protected void Page_Load(object sender, EventArgs e)    {        TestDataContext context = new TestDataContext();        //绑定数据        Repeater1.DataSource = context.Fruit;        Repeater1.DataBind();    }    protected void Button1_Click(object sender, EventArgs e)    {        //增加跳转页面        Response.Redirect("Insert.aspx");    }}

 

转载于:https://www.cnblogs.com/mn-b/p/5068839.html

你可能感兴趣的文章
#pragma once与#ifndef #define ...#endif的区别
查看>>
模拟复数及其运算
查看>>
IOS上路_01-Win7+VMWare9+MacOSX10.8+XCode4.6.3
查看>>
给Visual Studio 2010添加Windows Phone 7模板
查看>>
一次 web 工程性能测试
查看>>
wordpress 伪静态nginx设置
查看>>
今天写sql无意中发现了一个深坑
查看>>
记一次dell R720服务器ESXI5.5系统宕机的奇葩经历
查看>>
CMD一键获取 所有连接过的WIFI密码
查看>>
RabbitMQ
查看>>
android 下修改 hosts文件 及 out of memory的解决
查看>>
cocos2d win7 安卓环境配置开发
查看>>
java面试题之六(转)
查看>>
jQuery零基础入门——(六)修改DOM结构
查看>>
Java8 当 Lambda 遇上受检异常
查看>>
什么是竞态条件? 举个例子说明。
查看>>
PM日记:小试1 中午时光
查看>>
opensans字体
查看>>
FLEX入门学习路线图
查看>>
(六)用JAVA编写MP3解码器——帧数据结构
查看>>