Thursday, March 3, 2011

object doesnt support this property or method when calling showModalDialog in SharePoint 2010

 

You can solve this problem by putting

<Sharepoint:ScriptLink ID="ScriptLink1" Name="sp.ui.dialog.js" LoadAfterUI="true" Localizable="false" runat="server"></Sharepoint:ScriptLink>
<SharePoint:FormDigest runat="server" /> 

Wednesday, March 2, 2011

How to Automatically Refresh SharePoint WEB Parts.

(How to asynchronously update SharePoint web parts )

Option 1

image

In SharePoint 2010 there is a option called Enable Asynchronous Load in the AJAX Option section. thus we can set a Automatic Refreshing Interval as a refresh time.

Option 2

But this option is not available for all web parts. thus i did a little trick.

  • First I created a blank ASPX File. 

image

  • Then put the what ever web part that you need to show. this can be a custom SharePoint list also.

image

<script type="text/javascript">
<!--
function timedRefresh(timeoutPeriod) {
setTimeout("location.reload(true);",timeoutPeriod);
}
// -->
</script>


  • then put above JavaScript to refresh the page.



  • Finally but a page viewer web part to your page and browse and give the page created earlier. now you have automatically refreshing section.