I am gettting the following error when using RadAjaxManager and an asp:LinkButton.
Microsoft JScript runtime error: 'get_postBackElement().id' is null or not an object
However, if I invoke an Ajax call using the addNewClient button, and then I try and click the deleteClientLinkButton everything works fine. It is just on the first page load that the error is thrown.
If I set ClientIdMode = AutoID for the page (http://www.telerik.com/community/forums/aspnet-ajax/ajax/radajax-broken-in-vs-2010-beta-2-in-master-content-pages.aspx) then the LinkButton works properly. However, this renames all my controls and all my CSS is broken and no longer works.
Help please...
Microsoft JScript runtime error: 'get_postBackElement().id' is null or not an object
However, if I invoke an Ajax call using the addNewClient button, and then I try and click the deleteClientLinkButton everything works fine. It is just on the first page load that the error is thrown.
If I set ClientIdMode = AutoID for the page (http://www.telerik.com/community/forums/aspnet-ajax/ajax/radajax-broken-in-vs-2010-beta-2-in-master-content-pages.aspx) then the LinkButton works properly. However, this renames all my controls and all my CSS is broken and no longer works.
Help please...
<
asp:Content
ID
=
"Content1"
ContentPlaceHolderID
=
"headerContentPlaceholder"
runat
=
"Server"
>
<
script
type
=
"text/javascript"
>
$(document).ready(function () {
SetElements();
});
function SetElements() {
//addNewClient
$('#addNewClient').click(function () {
$('#addNewClient').attr("disabled", true);
$('#mainContentPlaceholder_newClientContainer').slideDown(function () {
$('#mainContentPlaceholder_newClientContainer').show();
});
});
//cancel
$('#cancel').click(function () {
$('#addNewClient').removeAttr("disabled");
$('#mainContentPlaceholder_newClientContainer').slideUp();
});
//close
$('#close').click(function () {
$('#mainContentPlaceholder_notificationContainer').fadeOut();
$('#notificationContainer').fadeOut();
});
};
function ResponseEnd(sender, eventArgs) {
SetElements();
Cufon.replace('h1');
Cufon.replace('h2');
Cufon.now();
};
</
script
>
</
asp:Content
>
<
asp:Content
ID
=
"Content2"
ContentPlaceHolderID
=
"mainContentPlaceholder"
runat
=
"Server"
>
<
div
id
=
"leftContainer"
runat
=
"server"
>
<
h1
>
Clients
</
h1
>
<
div
id
=
"notificationContainer"
runat
=
"server"
visible
=
"false"
>
<
asp:Literal
ID
=
"notificationLiteral"
runat
=
"server"
/><
span
><
a
href
=
"#"
id
=
"close"
></
a
></
span
></
div
>
<%--<
uc1:Notifications
ID
=
"notifications"
runat
=
"server"
/>--%>
<
div
id
=
"navigation"
>
<
a
id
=
"addNewClient"
href
=
"#"
class
=
"button hex2C608F"
>Add New Client</
a
>
</
div
>
<
div
id
=
"newClientContainer"
class
=
"extra-b5"
runat
=
"server"
>
<
table
class
=
"clientDetailsTable"
cellspacing
=
"0"
cellpadding
=
"0"
>
<
tr
>
<
td
>
<
h4
class
=
"extra-b5"
>
Client Details</
h4
>
</
td
>
</
tr
>
<
tr
>
<
td
>
<
asp:Label
ID
=
"clientNameLabel"
runat
=
"server"
Text
=
"Client Name"
/><
br
/>
<
asp:TextBox
ID
=
"clientNameTextBox"
runat
=
"server"
CssClass
=
"textbox short"
MaxLength
=
"50"
/>
<
asp:RequiredFieldValidator
ID
=
"clientNameRequiredValidator"
runat
=
"server"
ErrorMessage
=
"Please enter a client name."
Display
=
"None"
ControlToValidate
=
"clientNameTextBox"
ValidationGroup
=
"newClientGroup"
/>
</
td
>
<
td
>
<
asp:Label
ID
=
"themeLabel"
runat
=
"server"
Text
=
"Theme"
/><
br
/>
<
asp:DropDownList
ID
=
"themeDropDownList"
runat
=
"server"
AppendDataBoundItems
=
"true"
CssClass
=
"short"
>
<
asp:ListItem
Value
=
"-1"
>-- Please Select --</
asp:ListItem
>
</
asp:DropDownList
>
</
td
>
<
td
>
</
td
>
</
tr
>
<
tr
>
<
td
colspan
=
"2"
>
<
asp:Button
ID
=
"addClientButton"
runat
=
"server"
Text
=
"Add"
OnClick
=
"addClientButton_Click"
ValidationGroup
=
"newClientGroup"
/>
or <
a
id
=
"cancel"
href
=
"#"
>Cancel</
a
>
</
td
>
</
tr
>
</
table
>
<
asp:ValidationSummary
ID
=
"newClientValidationSummary"
runat
=
"server"
ShowMessageBox
=
"true"
ShowSummary
=
"false"
ValidationGroup
=
"newClientGroup"
/>
</
div
>
<
asp:ListView
ID
=
"clientsListView"
runat
=
"server"
>
<
LayoutTemplate
>
<
ul
class
=
"list1"
>
<
div
id
=
"itemPlaceholder"
runat
=
"server"
class
=
"list1"
>
</
div
>
</
ul
>
</
LayoutTemplate
>
<
ItemTemplate
>
<
li
>
<%# Eval("Name") %><
div
class
=
"options"
>
<
a
href
=
"ClientDetails.aspx?ClientId=<%# Eval("
Id") %>">Edit</
a
><
span
class
=
"separator"
>|</
span
>
<
asp:LinkButton
ID
=
"deleteClientLinkButton"
runat
=
"server"
OnCommand
=
"DeleteClient"
CommandArgument='<%# Eval("Id") %>' OnClientClick="return confirm('Are you sure you want to delete this client?')"
Text="Delete" />
<%--<
a
href
=
"ManageClients.aspx?ClientId=<%# Eval("
Id") %>" onclick="return confirm('Are you sure you want to delete this client?')">Delete</
a
></
div
>--%>
</
li
>
</
ItemTemplate
>
</
asp:ListView
>
</
div
>
<
div
id
=
"rightContainer"
runat
=
"server"
>
<
h1
>
Placeholder
</
h1
>
<
h4
class
=
"extra-b12"
>
Integer in metus sapien.</
h4
>
<
p
>
Praesent diam tellus, congue nec pellentesque dictum, convallis non dui. Nam tincidunt
tempor lectus quis placerat. Pellentesque habitant morbi tristique senectus et netus
et malesuada fames ac turpis egestas. Proin condimentum posuere nisl, ut mollis
metus mollis at.</
p
>
<
p
>
Integer in metus sapien. Maecenas aliquet porttitor nisl, a rhoncus ligula pellentesque
at. Maecenas tempor odio ut dolor pharetra faucibus. Cras in massa a odio vulputate
ultricies ac non purus. Etiam in orci nibh, quis dictum ante. In hac habitasse platea
dictumst.</
p
>
</
div
>
<
telerik:RadAjaxManagerProxy
ID
=
"RadAjaxManagerProxy1"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"addClientButton"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"leftContainer"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
<
telerik:AjaxSetting
AjaxControlID
=
"deleteClientLinkButton"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"leftContainer"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManagerProxy
>
<
telerik:RadAjaxLoadingPanel
ID
=
"radAjaxLoadingPanel"
runat
=
"server"
Skin
=
"Vista"
>
</
telerik:RadAjaxLoadingPanel
>
</
asp:Content
>