温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:小白留言板源码
当前文件:
XiaobaiLiuyanban/liuyanban.aspx.cs[1K,2009-6-12 11:59:24],打开代码结构图
XiaobaiLiuyanban/liuyanban.aspx.cs[1K,2009-6-12 11:59:24],打开代码结构图1using System; 2
using System.Data; 3
using System.Configuration; 4
using System.Collections; 5
using System.Web; 6
using System.Web.Security; 7
using System.Web.UI; 8
using System.Web.UI.WebControls; 9
using System.Web.UI.WebControls.WebParts; 10
using System.Web.UI.HtmlControls; 11
using System.Net; 12
public partial class liuyanban : System.Web.UI.Page 13
{ 14
protected void Page_Load(object sender, EventArgs e) 15
{ 16
if (!IsPostBack) 17
datalist(); 18
} 19
private void datalist() 20
{ 21
for (int i = 0; i <= 19; i++) 22
{ 23
this.dface.Items.Add("<img alt=\"表情\" border=\"0\" src=\"image/"+i.ToString()+".gif\"/>"); 24
this.dface.Items[i].Value = i.ToString() + ".gif"; 25
} 26
this.dface.Items[0].Selected = true; 27
} 28
protected void btnsend_Click(object sender, EventArgs e) 29
{ 30
try 31
{ 32
liuyan.insert(this.tsubject.Text, this.tname.Text, this.tmail.Text, this.tqq.Text, this.tphone.Text, Request.UserHostAddress, this.tadd.Text, this.thttp.Text, this.dface.SelectedValue, this.tcontent.Text); 33
34
} 35
catch (Exception aa) 36
{ 37
Response.Write(aa.Message); 38
} 39
Response.Redirect("showmessage.aspx"); 40
} 41
} 42






}
}