Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to create control at runtime if using template?
#8
The thing is that whenever you refresh the form, it will be rendered considering whatever you have in your template. If the control is not in the template, it won't be rendered.

So, if you expect a control to be created art runtime, parented to that region, declare the control in the template. When the control doesn't exist, IntraWeb template engine will just ignore it. However, after being created it renders correctly until you free it again.

Please check the modified project


.zip   Project1.zip (Size: 52.82 KB / Downloads: 6)

PS: There are othe ways to deal with this, including modifiying the template at runtime on the fly. However this is the simplest and most effective way.
Reply


Messages In This Thread
RE: How to create control at runtime if using template? - by Alexandre Machado - 01-26-2024, 06:08 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)