How can I allow AJAX option in custom web part for SharePoint 2010?
-
segunda-feira, 22 de março de 2010 07:19
As http://weblogs.asp.net/jan/archive/2010/03/01/little-sharepoint-2010-gem-ajax-options-in-list-view-web-parts.aspx mentioned, I can select AJAX option for out-of-the-box SharePoint 2010 webpart.
But, how can I allow AJAX option in custom web part, I just created Standboxed & Non-Standboxed Web Part by VS 2010 and deployed to MOSS 2010 for quick test, but it's seems no related option can be selected.
Could you please advise me can I llow AJAX option in custom web part?
.NET Beginner 3.5
Todas as Respostas
-
terça-feira, 23 de março de 2010 20:17
This is probably built into the web part and is not a general configuration setting for all web parts. Most likely you will need to add a script manager to the page (or master page) and then have your update panel within the actual web part. You also might be able to put the script manager in the web part, but it is generally a better idea to put it on the masterpage/page because you will see errors if there is more than one on a page.- Marcado como Resposta Hello World August quarta-feira, 24 de março de 2010 03:41
-
quarta-feira, 24 de março de 2010 03:41Thank you for your advice ^^
.NET Beginner 3.5 -
quarta-feira, 24 de março de 2010 08:00
ScriptManager scriptmgr = ScriptManager.GetCurrent(this.Page); if (scriptmgr == null) { scriptmgr = new ScriptManager(); if (this.Page.Form != null) { this.Page.Form.Controls.AddAt(0, scriptmgr); } }You can dynamically add it to the page as well. First check if it exists and if it does not. Add it as the first control on the form.
David Opdendries
-----------------------
blog- Marcado como Resposta Hello World August quinta-feira, 25 de março de 2010 06:29

