Friday, 6 September 2013

how can i make dynamically link button in asp.net(vb.net)

how can i make dynamically link button in asp.net(vb.net)

how can i make dynamically link button in asp.net(vb.net)
my code
<form id="form1" runat="server">
<% For index As Integer = 1 To 10 %>
<asp:LinkButton ID="#EVAL<%=index%>"
runat="server"><%=index%></asp:LinkButton>
<% Next %>
</form>
i use dynamically using panel but this create problem when use br tag then
that will not give new line
that code
Dim lk As LinkButton
For index As Integer = 1 To 10
lk = New LinkButton
lk.ID = index
lk.Text = index
Panel1.Controls.Add(lk)
Next

No comments:

Post a Comment