<%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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Niradhip ChakrabortyRank #429 · 5.8K reputationPosted Jul 17, 2009, 10:06 AM EDT
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",
"");
}