博客
关于我
asp.net 4.5 练习~test9-3
阅读量:307 次
发布时间:2019-03-03

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

webform1.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="test9_3.WebForm1" %>
新闻标题:
新闻编号:
新闻标题:
新闻类别:
发布日期:

webform1.aspx.cs

using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;namespace test9_3{    public partial class WebForm1 : System.Web.UI.Page    {        protected void Page_Load(object sender, EventArgs e)        {        }        protected void DataList1_ItemCommand(object source, DataListCommandEventArgs e)        {            DataList1.SelectedIndex = e.Item.ItemIndex;            DataList1.DataBind();        }    }}

sql

CREATE DATABASE db_newsUSE db_newsGOCREATE TABLE dbo.tb_news(id int identity(1,1) not null primary key,title varchar(50) not null,content varchar(2000) not null,categories varchar(50) not null,type1 varchar(50) not null,issueDate datetime not null default getdate())GOinsert into tb_news(title,content,categories,type1)values('创业板开板','新浪财经讯10月17日上午消息 中国证监会主席在企业投融资论坛上透露,经国务院批准成立创业板。','环球经济','国内新闻');

web.config

 

转载地址:http://cbrm.baihongyu.com/

你可能感兴趣的文章
Mysql 纵表转换为横表
查看>>
mysql 编译安装 window篇
查看>>
mysql 网络目录_联机目录数据库
查看>>
MySQL 聚簇索引&&二级索引&&辅助索引
查看>>
Mysql 脏页 脏读 脏数据
查看>>
mysql 自增id和UUID做主键性能分析,及最优方案
查看>>
Mysql 自定义函数
查看>>
mysql 行转列 列转行
查看>>
Mysql 表分区
查看>>
mysql 表的操作
查看>>
mysql 视图,视图更新删除
查看>>
MySQL 触发器
查看>>
mysql 让所有IP访问数据库
查看>>
mysql 记录的增删改查
查看>>
MySQL 设置数据库的隔离级别
查看>>
MySQL 证明为什么用limit时,offset很大会影响性能
查看>>
Mysql 语句操作索引SQL语句
查看>>
MySQL 误操作后数据恢复(update,delete忘加where条件)
查看>>
MySQL 调优/优化的 101 个建议!
查看>>
mysql 转义字符用法_MySql 转义字符的使用说明
查看>>