代码解释!专业人士请进!
小弟新手,请多关照,跪谢了,急用!protected string show_admin(int id)
{
if (Session["admin"] != null)
{
return "<a href=re.aspx?id=" + id + ">回复</a>" + " <a href=del.aspx?id=" + id + ">删除</a>";
}
else
{
return null;
}
}
protected void addly_Click(object sender, EventArgs e)
{
book binbin = new book();
binbin.username = Server.HtmlEncode(this.username.Text);
binbin.email = this.email.Text;
binbin.qq = this.qq.Text;
binbin.homepage = this.homepage.Text;
if (this.Radboy.Checked)
{
binbin.sex = "男";
binbin.face = "boy";
}
else
{
binbin.sex = "女";
binbin.face = "gril";
}
binbin.body = this.lybody.Text;
if (this.ishde.Checked)
{
binbin.ishide = true;
}
else
{
binbin.ishide = false;
}
Label1.Text = binbin.ishide.ToString();
if (saveinfo.savely(binbin))
{
Response.Redirect("lyb.aspx");
}
else
{
Response.Write("<script>alert('留言失败,服务器错误!');location.herf='lyb.aspx'");
}
}