日期:2014-05-20 浏览次数:21060 次
protected void lkbtnDelete_Click(object sender, EventArgs e)
{
int index = ((RepeaterItem)(sender as LinkButton).Parent).ItemIndex;
Label lb = rptAdverse.Items[index].FindControl("lblAdID") as Label;
int id = Convert.ToInt32(lb.Text);
int ccc = 2200;//这个是获取的
decimal sss = 0.86;
Response.Write(string.Format("<script>if(confirm('确认删除,删除后将扣除"+ccc+"个金币<br/>退回比率"+sss+"%')){{{0}}}else{{{1}}}</script>", WriteStr(id),Cancel()));
}
public string WriteStr(int id)
{
//执行sql语句,执行删除的方法
return "alert('删除成功!')";
}
private string Cancel()
{
return "alert('您未删除!')";
}