using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Bloger_BlogManage_LinkManage : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void SqlDataSource1_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
    {
        e.Command.Parameters["@bloger_name"].Value = this.User.Identity.Name;

    }
    protected void SqlDataSource1_Inserting(object sender, SqlDataSourceCommandEventArgs e)
    {
        e.Command.Parameters["@bloger_name"].Value = this.User.Identity.Name;
        e.Command.Parameters["@link_name"].Value = this.TextBox1.Text;
        e.Command.Parameters["@link_url"].Value = this.TextBox2.Text;
    }
   
    protected void LinkButton3_Click(object sender, EventArgs e)
    {
        if (this.TextBox1.Text == "")
        {
            Response.Write("<script>alert('请输入友站名称')</script>");
            return;
        }
        if (this.TextBox2.Text == "")
        {
            Response.Write("<script>alert('请输入友站地址')</script>");
            return;
        }
        this.SqlDataSource1.Insert();

        this.TextBox1.Text = "";
        this.TextBox2.Text = "";
    }
}
