P
Puja Parekh
hi all,
i have an aspx page and its got one panel.
now am creating link buttons dynamically and adding it to a panel. When I
run, it shows all link buttons in 2-3 lines in a panel which is how i want
to display
now my problem is i want to display link button's text and the current time
below it as a whole link, when i do sth like linkButton.Text = "LinkButton 1
<br/> " + DateTime.Now.ToString(); , I loose them displaying all in 2-3
lines. Below is my code and its not displaying the button how i want them
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
LinkButton lnkButton = new LinkButton();
lnkButton.ID = "lnkButton" + i;
lnkButton.Text = "LinkButton" + i.ToString() + "<br/>" +
DateTime.Now.ToString();
lnkButton.Font.Bold = true;
lnkButton.Font.Name = "Arial";Panel1.Controls.Add(lnkButton);
Literal ltl = new Literal();
ltl.Text = ", ";
if (i < ds.Tables[0].Rows.Count - 1)
Panel1.Controls.Add(ltl);
}
Thanks
puja
i have an aspx page and its got one panel.
now am creating link buttons dynamically and adding it to a panel. When I
run, it shows all link buttons in 2-3 lines in a panel which is how i want
to display
now my problem is i want to display link button's text and the current time
below it as a whole link, when i do sth like linkButton.Text = "LinkButton 1
<br/> " + DateTime.Now.ToString(); , I loose them displaying all in 2-3
lines. Below is my code and its not displaying the button how i want them
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
LinkButton lnkButton = new LinkButton();
lnkButton.ID = "lnkButton" + i;
lnkButton.Text = "LinkButton" + i.ToString() + "<br/>" +
DateTime.Now.ToString();
lnkButton.Font.Bold = true;
lnkButton.Font.Name = "Arial";Panel1.Controls.Add(lnkButton);
Literal ltl = new Literal();
ltl.Text = ", ";
if (i < ds.Tables[0].Rows.Count - 1)
Panel1.Controls.Add(ltl);
}
Thanks
puja