Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Contributor
2449 Points
366 Posts
Nov 19, 2011 05:21 PM|LINK
Here is a code sample to try:
Dim a As New Label a.ID = "testing" a.Text = "Testing this out." Dim c As ContentPlaceHolder = Master.FindControl("MainContent") c.Controls.Add(a)
Thanks,,
Jason
jgangwisch
Contributor
2449 Points
366 Posts
Re: how to add dynamically a control on aspx page with masterpage
Nov 19, 2011 05:21 PM|LINK
Here is a code sample to try:
Dim a As New Label a.ID = "testing" a.Text = "Testing this out." Dim c As ContentPlaceHolder = Master.FindControl("MainContent") c.Controls.Add(a)Thanks,,
Jason