`
cbting
  • 浏览: 57852 次
  • 性别: Icon_minigender_1
  • 来自: 汕头
社区版块
存档分类
最新评论
文章列表
 //搜索按钮    protected void Ibtnsearch_Click(object sender, ImageClickEventArgs e)    {        string key = Textkey.Text.Trim();        string action = Radtitle.Checked ? "bytitle" : "byconent";        Response.Redirect("~/Searchers.aspx?key="+Server.UrlEncode( key)+" ...
CREATE PROCEDURE Selectbycontent@content varchar(100)ASBEGINselect c.id,[name],title,createtime,caid from news n join category c on n.caid=c.idwhere n.content like '%'+@content+'%'order by createtime descENDGO

SQLHelper类

    博客分类:
  • C#
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data;using System.Data.SqlClient;using System.Configuration; namespace DAL{    public class SQLhepler    {        private SqlConnection connection = null;        private SqlCommand comm = null;        priv ...
 protected void Button1_Click(object sender, EventArgs e)    {        bool Files = false;        //判断文件的类型是否符合要求        if(this .FileUpload1.HasFile)        {            //获取删除文件的后缀            string fileSuffix = System.IO.Path.GetExtension(this .FileUpload1.FileName).ToLower();            string[] S ...
<marquee direction="up" width="147px" scrollamount="3" onmouseover="this.stop()" height="75px" onmouseout="this.start()" >                <asp:Label ID="lblBulletin" runat="server" Text=" 欢迎大家来到第二网络商店,如果发现我们 ...
Page.ClientScript.RegisterStartupScript(Page.GetType(), "message", "<script language='javascript' defer>alert('加入暂存架成功!');</script>");  
.NET截取指定长度汉字超出部分以...代替 ///   <summary>       ///   将指定字符串按指定长度进行剪切,       ///   </summary>       ///   <param   name= "oldStr "> 需要截断的字符串 </param>       ///   <param   name= "maxLength "> 字符串的最大长度 </param>       ///   <param   name= "en ...
using System.Web.Security;      protected void Page_Load(object sender, EventArgs e)    {        Response.Write("123的MD吗是" + FormsAuthentication.HashPasswordForStoringInConfigFile("123","MD5"));    }         string pwd = txtpassword.Text.Trim();        //把密码转为md5的形式     ...
 <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false" CssClass="tablecss">         <Columns>             <asp:TemplateField HeaderText="编号" HeaderStyle-CssClass="aaa" ItemStyle-CssClass="bbb">   ...
  if (!Page.IsPostBack)            {                DataTable dt = new CategoryManager().SeleteAll();                ddlCategory.DataSource = dt;                ddlCategory.DataTextField = "name";                ddlCategory.DataValueField = "id";                ddlCategory.DataBin ...
   <p><webdiyer:AspNetPager ID="anp" runat="server" onpagechanging="anp_PageChanging" PageSize="5"                            UrlPaging="True">    </webdiyer:AspNetPager></p>       private void NewsList()    {        DataSe ...
    protected void Button1_Click(object sender, EventArgs e)  //A页面    {        //Response对象的Redirect方法重定向的功能.并向重定向的url传递参数        string name = txtname.Text.Trim();        string sex = "先生";        if (RadioButton2.Checked)            sex = "小姐";        Response.Redirect("We ...

js5秒倒计时

    博客分类:
  • js
    <script language="javascript" type="text/javascript">        var i = 5;       intervalid= setInterval("fun()", 1000);        function fun() {            if (i == 0) {                window.location.href = "default.aspx";                clearInterval(i ...
*{//所以的外边距个内边距都零 margin:0; padding :0;} body {/*统一的所有的字体*/ font-size:14px;} #footer{   /*尾部区域样式居中*/ text-align:center;/*尾部文字样式居中*/ border-top:2px solid #EDEAFD; padding:10px; width:767px; margin:10px auto 10px auto;/*上下10px左右是自动居中*/   clear:left ;} a:link,a:visited{    /*鼠标未上去的超链接样式  .访问后的超链接样式*/  ...
    public void DatabindClass2()    {        string drop1 = this.DropDownList1.SelectedValue;        DropDownList2.DataSource = new Class1_bll().SelectClasss_2(drop1);        DropDownList2.DataTextField = "cname";        DropDownList2.DataValueField = "classid_2";        DropDownL ...
Global site tag (gtag.js) - Google Analytics