Below is the sample code. Please try this approach
protected void Page_Load(object sender, EventArgs e)
{
Literal lit = new Literal();
lit.Text = "You can take only Reward.Do You Want To Continue";
errdv.Controls.Add(lit);
LinkButton linBtn = new LinkButton();
linBtn.ID = "myid";
linBtn.Text = "Yes";
linBtn.Click += Yes_Click;
errdv.Controls.Add(linBtn);
linBtn = new LinkButton();
linBtn.ID = "CancelBtn";
linBtn.Text = "Cancel";
linBtn.Click += Cancel_Click;
errdv.Controls.Add(linBtn);
}
protected void Yes_Click(object sender, EventArgs e)
{
}
protected void Cancel_Click(object sender, EventArgs e)
{
}