dynamic creation of view

A

Aleks Kleyn

I try in new beta of asp.net to work with view control. I created multiview
control and put there staticaly view contol. On the next step I want
dynamicaly add new view contol. I put text
Dim aView As New View
aView.ID = "aaa"
aView.Controls.Add(New LiteralControl("<iframe width=100%
height=100% src=http://arxiv.org/abs/"))
aView.Controls.Add(New LiteralControl("></ifrane>"))
Me.MultiView_ePrintList.Views.Add(aView)
Me.MultiView_ePrintList.SetActiveView(aView)
It works, however when I click any control on the page I got message that in
contols collection is larger then number of controls. If I add view to
controls collection I get similar message for views collection. If I add
control to both collections I will see message for controls collection. How I
can resolve this problem?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,127
Latest member
CyberDefense
Top