<%for (int i=o;i<5;i++)
{%>
<%}%>
at it producing five link buttons like
i i i i i
but i just want five link buttons like that
1 2 3 4 5
with id=1,2,3,4,5 respectively
how can I can implement that
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Niradhip ChakrabortyPosted Jul 17, 2009, 2:06 PM
Code Snippet:
//Link Button
LinkButton lnk = new LinkButton();
lnk.ID = "lnk";
lnk.Text = "LinkButton";
lnk.Click += new System.EventHandler(lnk_Click);
this.form1.Controls.Add(lnk);
Event Handler:
protected void lnk_Click(object sender, EventArgs e)
{
ClientScript.RegisterClientScriptBlock(this.GetType(), "lnk",
"");
}