D
djc
I have something like the following:
---------------------------------------------------
Dim btnAddUpdateDetail As New LinkButton()
btnAddUpdateDetail.Text = "Add/Update Issue Detail"
btnAddUpdateDetail.CommandName = "AddUpdateDetail"
AddHandler btnAddUpdateDetail.Command, AddressOf HandleActions
ActionsPanel.Controls.Add(btnAddUpdateDetail)
Dim BR1 As New Literal()
BR1.Text = "<br/>"
ActionsPanel.Controls.Add(BR1)
Dim btnChangeType As New LinkButton()
btnChangeType.Text = "Change this issue's type"
btnChangeType.CommandName = "ChangeIssueType"
AddHandler btnChangeType.Command, AddressOf HandleActions
ActionsPanel.Controls.Add(btnChangeType)
Dim BR2 As New Literal() BR2.Text = "<br/>"
ActionsPanel.Controls.Add(BR2)
-------------------------------------------------------
1) is there a better way to do this that would relieve me of having to
create a seperate variable for each Literal control that is used to insert a
<br/> tag? I am dynamically loading these buttons based on some criteria and
there could be up to 6 or 7 buttons needed based on like 10 different
scenarios. The above example is just a small snippet of the code. I am using
a SELECT CASE statment and each case may have code like the example with up
to 6 or 7 buttons to create, each with a <br/> after them. There must be a
better way.
---------------------------------------------------
Dim btnAddUpdateDetail As New LinkButton()
btnAddUpdateDetail.Text = "Add/Update Issue Detail"
btnAddUpdateDetail.CommandName = "AddUpdateDetail"
AddHandler btnAddUpdateDetail.Command, AddressOf HandleActions
ActionsPanel.Controls.Add(btnAddUpdateDetail)
Dim BR1 As New Literal()
BR1.Text = "<br/>"
ActionsPanel.Controls.Add(BR1)
Dim btnChangeType As New LinkButton()
btnChangeType.Text = "Change this issue's type"
btnChangeType.CommandName = "ChangeIssueType"
AddHandler btnChangeType.Command, AddressOf HandleActions
ActionsPanel.Controls.Add(btnChangeType)
Dim BR2 As New Literal() BR2.Text = "<br/>"
ActionsPanel.Controls.Add(BR2)
-------------------------------------------------------
1) is there a better way to do this that would relieve me of having to
create a seperate variable for each Literal control that is used to insert a
<br/> tag? I am dynamically loading these buttons based on some criteria and
there could be up to 6 or 7 buttons needed based on like 10 different
scenarios. The above example is just a small snippet of the code. I am using
a SELECT CASE statment and each case may have code like the example with up
to 6 or 7 buttons to create, each with a <br/> after them. There must be a
better way.