Is Sitefinity Ajax enabled??
Hello,
I've created a master page with a custom user control (2 dropdown) and I've added a downloadlist, I've set paging on the dowloadlist and when I switch the downloadlist page I got the refresh on the whole page (so my dropdown reloads.....) is there a simple way of enabling an ajax behavior for it?
Thanks
Paolo
Hello Paolo,
We set NAvigateUrl to the link of a page, so this makes ResponseRedirct. You can persist the combo value using attributes, cookie or session.
Greetings,
Ivan Dimitrov
the Telerik team
So If I've got 4 own written custom control I've to persist each one with some tecnic....... ok perfect
Hello Ivan,
consider this case, I've got a menu in the template, I wish only to update the content and not to reload all the page, can I put an ajax container for the content (where content is the central part) or not?
Thanks
Hi Paolo,
You can use RadAjaxPanel and all postbacks that your control performs will be converted to an AJAX requests without. Another option is updating the controls through services.
Kind regards,
Ivan Dimitrov
the Telerik team
Hello Ivan,
can you please provide me two samples? I think it's simplier the first.... can I tell the
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"RadCalendar1"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"MainContent"
></
telerik:AjaxUpdatedControl
>
<asp:ContentPlaceHolder
?
Thanks
Hello Paolo,
Here is a sample
<telerik:RadCodeBlock ID=
"RadCodeBlock1"
runat=
"server"
>
function OnRequestStart(sender, args)
var statusLabel = document.getElementById(
"<%= statusLabel.ClientID %>"
);
var txtBody = document.getElementById(
"<%= txtBody.ClientID %>"
);
var sendMessage = document.getElementById(
"<%= sendMessage.ClientID %>"
);
if
(args.get_eventTarget().indexOf(
"sendMessage"
) != -1)
statusLabel.innerHTML =
"Sending message..."
;
else
statusLabel.innerHTML =
"Restoring..."
;
txtBody.disabled =
true
;
sendMessage.disabled =
true
;
function OnResponseEnd(sender, args)
var txtBody = document.getElementById(
"<%= txtBody.ClientID %>"
);
txtBody.disabled =
false
;
</script>
</telerik:RadCodeBlock>
<telerik:RadAjaxPanel id=
"RadAjaxPanel1"
runat=
"server"
ClientEvents-OnResponseEnd=
"OnResponseEnd"
ClientEvents-OnRequestStart=
"OnRequestStart"
>
<asp:Button Text=
"Send Message"
OnClick=
"sendMessage_Click"
runat=
"server"
ID=
"sendMessage"
Style=
"width: 116px;"
/>
<asp:TextBox ID=
"txtBody"
Text=
"Type here..."
runat=
"server"
Width=
"509px"
Height=
"208px"
TextMode=
"MultiLine"
Rows=
"100"
Columns=
"20"
Style=
"border: 0px; background-color: transparent;font-size: 12px;"
/>
<asp:Label ID=
"statusLabel"
runat=
"server"
Style=
"color: #698901; margin-top: 13px; display: block;"
/>
</telerik:RadAjaxPanel>
public
void
sendMessage_Click(
object
sender, System.EventArgs e)
System.Threading.Thread.Sleep(500);
//Should remove this from production code!
txtBody.Text =
"Type here..."
;
statusLabel.Text =
"Message sent!"
;