Well, maybe not on its own. My problem is that it fires before even Page_Load. I have the following code to create each page view programmatically :
protected void Multipage1PageViewCreated(object sender, RadMultiPageEventArgs e) |
{ |
RadPageView newpage = e.PageView; |
RadEditor editor = new RadEditor { ID = "radeditor" + e.PageView.Index, Width = 800}; |
UpdatePanel updatepanel = new UpdatePanel |
{ |
ID = "updatepanel" + e.PageView.Index, |
UpdateMode = UpdatePanelUpdateMode.Conditional |
}; |
//RadioButtonList Start |
RadioButtonList rbl = new RadioButtonList {RepeatDirection = RepeatDirection.Vertical, Width = 130}; |
rbl.SelectedIndexChanged += new EventHandler(RadioButtonListEditModeSelectedIndexChanged); |
rbl.AutoPostBack = true; |
ListItem li1 = new ListItem(); |
ListItem li2 = new ListItem(); |
ListItem li3 = new ListItem(); |
rbl.ID = "radiobuttonlist" + e.PageView.Index; |
li1.Value = "FullSet"; |
li1.Text = "Advanced toolset"; |
li2.Value = "Default"; |
li2.Text = "Default"; |
li3.Value = "BasicTools"; |
li3.Text = "Basic toolset"; |
rbl.Items.Add(li1); |
rbl.Items.Add(li2); |
rbl.Items.Add(li3); |
//RadioButtonList End |
Literal ltr = new Literal |
{ |
Text = "<div class=\"radiobuttonlist\"><b>Choose a toolbar style:</b>" |
}; |
Literal ltr2 = new Literal { Text = "</div>" }; |
Literal ltrTitle = new Literal {Text = "<h2>Τίτλος</h2>"}; |
TextBox txtTitle = new TextBox(); |
txtTitle.Width = 800; |
txtTitle.Height = 20; |
Literal ltrDivStart = new Literal {Text = "<div class='ArticleTitle'>"}; |
Literal ltrDivEnd = new Literal {Text = "</div>"}; |
Literal ltrDivStart2 = new Literal { Text = "<div style='float:left;'>" }; |
Literal ltrDivEnd2 = new Literal { Text = "</div>" }; |
updatepanel.ContentTemplateContainer.Controls.Add(editor); |
updatepanel.ContentTemplateContainer.Controls.Add(ltr); |
updatepanel.ContentTemplateContainer.Controls.Add(rbl); |
updatepanel.ContentTemplateContainer.Controls.Add(ltr2); |
newpage.Controls.Add(ltrDivStart); |
newpage.Controls.Add(ltrTitle); |
newpage.Controls.Add(txtTitle); |
newpage.Controls.Add(ltrDivEnd); |
newpage.Controls.Add(ltrDivStart2); |
newpage.Controls.Add(updatepanel); |
newpage.Controls.Add(ltrDivEnd2); |
HiddenField hiddenField = new HiddenField(); |
hiddenField.Value = Languages[e.PageView.Index]; |
newpage.Controls.Add(hiddenField); |
} |
This was suggested by a member of the team. Now, outside of the control that contains the tab strip and multi page and all that I have an asp:Button. On its OnClick event I want to get the values of everything in this control. My problem is that PageViewCreated fires before everything else when I click the button. Before the function I have for OnClick and before Page_Load. Any solutions? Thanks in advance.