Hello. I present a simplified version of the implementation in which I found this problem.
Let's suppose I have a user control, called Redirector, which only has a link button for markup, and who's job it is to redirect to a certain page:
I want to put this on a page, inside of a RadWindow, along with some other controls. Here's the markup for my page:
And here is the code-behind for the page:
If the user opens the RadWindow and immediately clicks the linkbutton, Page.Redirect() happens with no problem. However, if the user first clicks on btnPostback, and then clicks the linkbutton, the InnerAjaxPanel throws a javascript error.
Microsoft JScript runtime error: Unable to get value of the property '_events': object is null or undefined
Could you please look into this and let me know what is causing the problem, and how I could fix it?
Thank you.
Let's suppose I have a user control, called Redirector, which only has a link button for markup, and who's job it is to redirect to a certain page:
Public
Class
Redirector
Inherits
UserControl
Private
Sub
lnkRedirect_Command(sender
As
Object
, e
As
System.Web.UI.WebControls.CommandEventArgs)
Handles
lnkRedirect.Command
Response.Redirect(
"~/WebForm2.aspx"
)
End
Sub
End
Class
I want to put this on a page, inside of a RadWindow, along with some other controls. Here's the markup for my page:
<%@ Register TagPrefix="testApp" TagName="Redirector" Src="~/Redirector.ascx" %>
<
asp:Content
runat
=
"server"
ContentPlaceHolderID
=
"ContentPlaceHolder1"
>
Page 1
<
br
/>
<
asp:Button
ID
=
"btnOpen"
runat
=
"server"
Text
=
"Open"
/>
<
trk:RadWindow
runat
=
"server"
ID
=
"MainRadWindow"
>
<
ContentTemplate
>
Hello there.
<
trk:RadAjaxPanel
ID
=
"InnerAjaxPanel"
runat
=
"server"
>
<
ul
>
<
li
>
<
testApp:Redirector
ID
=
"Redirector1"
runat
=
"server"
/>
</
li
>
<
li
>
<
asp:Button
ID
=
"btnPostBack"
runat
=
"server"
Text
=
"Postback"
/>
</
li
>
<
li
>
<
asp:Label
ID
=
"lblTime"
runat
=
"server"
/>
</
li
>
</
ul
>
</
trk:RadAjaxPanel
>
</
ContentTemplate
>
</
trk:RadWindow
>
</
asp:Content
>
And here is the code-behind for the page:
Public
Class
WebForm1
Inherits
System.Web.UI.Page
Private
Sub
btnOpen_Command(sender
As
Object
, e
As
System.Web.UI.WebControls.CommandEventArgs)
Handles
btnOpen.Command
MainRadWindow.VisibleOnPageLoad =
True
End
Sub
Private
Sub
btnPostBack_Command(sender
As
Object
, e
As
System.Web.UI.WebControls.CommandEventArgs)
Handles
btnPostBack.Command
lblTime.Text = Now.TimeOfDay().ToString
End
Sub
End
Class
If the user opens the RadWindow and immediately clicks the linkbutton, Page.Redirect() happens with no problem. However, if the user first clicks on btnPostback, and then clicks the linkbutton, the InnerAjaxPanel throws a javascript error.
Microsoft JScript runtime error: Unable to get value of the property '_events': object is null or undefined
Could you please look into this and let me know what is causing the problem, and how I could fix it?
Thank you.