Creating a dynamic button in code behind as:
Dim b As Button = New Button()
b.Text = "Some Dynamic Text Here"
b.PostBackUrl = "some_page.asx"
I want to be able to render that in a specific location on an aspx page.
In aspx page, I want to do:
<td>
<%
If (specific condition) Then
'render that specific button here <---------
Else
'render something else
End If
%>
</td>
1 – I know of being able to do a
Page.Form.Controls.Add(dynamic button here)
but I can not add it into a specific place on the page (not even with CSS because the button will go into a table — the table has a column of numbers where if non zero, a button will show that crosspage postback to show drilldowned items)
You can put a placeholder where you want the button to be
And add the button in the code