protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { DropWriter.DataSource = WriterRespositery.GetAllWriter(); DropWriter.DataTextField = "WriterName"; DropWriter.DataValueField = "WriterID"; DropWriter.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["ID"] != null) { int id = int.Parse(Request.QueryString["ID"]); WriterRespositery.DeleteWriter(id); Response.Redirect("WriterList.Aspx"); } Repeater1.DataSource = WriterRespositery.GetAllWriter(); Repeater1.DataBind(); }