- 浏览: 59658 次
- 性别:
- 来自: 汕头
最新评论
-
cangshanshouwei:
这也不能用啊,请发个全一点儿的。
FileUpload上传图片
文章列表
//搜索按钮 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)+" ...
- 2009-05-14 21:07
- 浏览 643
- 评论(0)
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
- 2009-05-14 20:50
- 浏览 644
- 评论(0)
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 ...
- 2009-05-11 17:42
- 浏览 916
- 评论(0)
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 ...
- 2009-05-11 00:46
- 浏览 1375
- 评论(1)
<marquee direction="up" width="147px" scrollamount="3" onmouseover="this.stop()" height="75px" onmouseout="this.start()" > <asp:Label ID="lblBulletin" runat="server" Text=" 欢迎大家来到第二网络商店,如果发现我们 ...
- 2009-05-10 22:08
- 浏览 786
- 评论(0)
Page.ClientScript.RegisterStartupScript(Page.GetType(), "message", "<script language='javascript' defer>alert('加入暂存架成功!');</script>");
- 2009-05-10 22:07
- 浏览 652
- 评论(0)
.NET截取指定长度汉字超出部分以...代替
/// <summary> /// 将指定字符串按指定长度进行剪切, /// </summary> /// <param name= "oldStr "> 需要截断的字符串 </param> /// <param name= "maxLength "> 字符串的最大长度 </param> /// <param name= "en ...
- 2009-05-10 22:06
- 浏览 661
- 评论(0)
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的形式 ...
- 2009-05-10 22:03
- 浏览 801
- 评论(0)
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false" CssClass="tablecss"> <Columns> <asp:TemplateField HeaderText="编号" HeaderStyle-CssClass="aaa" ItemStyle-CssClass="bbb"> ...
- 2009-05-10 22:01
- 浏览 736
- 评论(0)
DropDownList的绑定
- 博客分类:
- asp.net小知识
if (!Page.IsPostBack) { DataTable dt = new CategoryManager().SeleteAll(); ddlCategory.DataSource = dt; ddlCategory.DataTextField = "name"; ddlCategory.DataValueField = "id"; ddlCategory.DataBin ...
- 2009-05-10 21:59
- 浏览 960
- 评论(0)
AspNetPager进行分页
- 博客分类:
- asp.net小知识
<p><webdiyer:AspNetPager ID="anp" runat="server" onpagechanging="anp_PageChanging" PageSize="5" UrlPaging="True"> </webdiyer:AspNetPager></p>
private void NewsList() { DataSe ...
- 2009-05-10 21:58
- 浏览 1084
- 评论(0)
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 ...
- 2009-05-10 21:56
- 浏览 1667
- 评论(0)
<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 ...
- 2009-05-10 21:54
- 浏览 1048
- 评论(0)
*{//所以的外边距个内边距都零 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{ /*鼠标未上去的超链接样式 .访问后的超链接样式*/ ...
- 2009-05-10 21:53
- 浏览 704
- 评论(0)
public void DatabindClass2() { string drop1 = this.DropDownList1.SelectedValue; DropDownList2.DataSource = new Class1_bll().SelectClasss_2(drop1); DropDownList2.DataTextField = "cname"; DropDownList2.DataValueField = "classid_2"; DropDownL ...
- 2009-05-10 21:44
- 浏览 939
- 评论(0)