I have a RadMultipage control on my asp.net web page.
I am loading the user controls as pages inside this control.
Below is the code to load the user controls.
protected void RadMultiPage1_PageViewCreated(object sender, Telerik.Web.UI.RadMultiPageEventArgs e)
{
try
{
string controlName;
int index = e.PageView.ID.Trim().IndexOf(" ");
if (index > 0)
{ controlName = e.PageView.ID.Trim().Remove(index); }
else
{ controlName = e.PageView.ID; }
Control pageViewContents = LoadControl(controlName + ".ascx");
pageViewContents.ID = e.PageView.ID + "userControl";
e.PageView.Controls.Add(pageViewContents);
}
catch (Exception ex)
{
Utility.WalkException(this, ex, "There was an error while performing this operation.");
}
}
I have also enabled the view state and autoeventwireup.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" EnableViewState="true" ViewStateMode="Enabled" Inherits="VentureAssessmentApp.Default" %>
Now the problem I am having is with the button on the user control. The click event of that button is not getting fired. It just reloads the page. Even the IsPostBack is returning false.
Can any one suggest some solution ? It happens that some times the click event works and most of the time it doesn't work.