﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - WebGrid Enterprise - WebFlyPostBackMethod() attribute is not working in SharePoint WebPart ?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebFlyPostBackMethod-attribute-is-not-working-in-SharePoint-WebPart-/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>WebFlyPostBackMethod() attribute is not working in SharePoint WebPart ?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebFlyPostBackMethod-attribute-is-not-working-in-SharePoint-WebPart-/</link><pubDate>Mon, 05 Apr 2010 04:10:42 GMT</pubDate><dc:creator>Glayaar</dc:creator><category>WebFlyPostBackMethod</category><description>&lt;p&gt;Based on my discussion with the developer, the error is raised because the page could not found the function, which might be caused by setting the service url incorrectly.&lt;/p&gt;&lt;p&gt;We suggest using similar technique in our WebDesktop sample, SimpleTypeWF.aspx, in which we set the service URL to an external form.&lt;br /&gt;&lt;/p&gt;
&lt;p&gt; &lt;br /&gt;&lt;/p&gt;</description></item><item><title>WebFlyPostBackMethod() attribute is not working in SharePoint WebPart ?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebFlyPostBackMethod-attribute-is-not-working-in-SharePoint-WebPart-/</link><pubDate>Fri, 02 Apr 2010 04:55:07 GMT</pubDate><dc:creator>desaigs81</dc:creator><category>WebFlyPostBackMethod</category><description>&lt;p&gt;Please find the attached sample havin an aspx file and its code behind having two drop down lists with flypostback manager implemenation. It works just absoutely fine and when i implemented same in my SharePoint web part where on clic of a button i want to get some date asynchronously and refresh the grid with latest data asyncrhonously withough full page post back, but i am getting javascript error saying object or method is undefined. It seems even after adding attribute to the method it is not accessible in javascript..&lt;/p&gt;
&lt;p&gt;Some of the code extract i added for WebFlyPostBackManager&lt;/p&gt;
&lt;p&gt;1. &lt;strong&gt;In CreateChildControls() method.&lt;/strong&gt;&lt;/p&gt;&lt;span style="font-size: 13px"&gt;&lt;span style="font-size: 13px"&gt;
&lt;p style="text-align: left"&gt;webFlyPostBackManager = &lt;span style="font-size: 13px; color: #0000ff"&gt;new&lt;/span&gt;&lt;span style="font-size: 13px"&gt; &lt;/span&gt;&lt;span style="font-size: 13px; color: #008080"&gt;WebFlyPostBackManager&lt;/span&gt;&lt;span style="font-size: 13px"&gt;(); 
&lt;p style="text-align: left"&gt;webFlyPostBackManager.BlockPageUIOnBusy = &lt;span style="font-size: 13px; color: #0000ff"&gt;true&lt;/span&gt;&lt;span style="font-size: 13px"&gt;;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-align: left"&gt;webFlyPostBackManager.BlockPageUIOnBusy = &lt;span style="font-size: 13px; color: #0000ff"&gt;true&lt;/span&gt;&lt;span style="font-size: 13px"&gt;;&lt;/span&gt;&lt;/p&gt;

&lt;p style="text-align: left"&gt;webFlyPostBackManager.BlockPageUIOnBusy = &lt;span style="font-size: 13px; color: #0000ff"&gt;true&lt;/span&gt;&lt;span style="font-size: 13px"&gt;;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;span style="font-size: 13px; color: #0000ff"&gt;new&lt;/span&gt;&lt;span style="font-size: 13px"&gt; &lt;/span&gt;&lt;span style="font-size: 13px; color: #008080"&gt;WebFlyPostBackManager&lt;/span&gt;&lt;span style="font-size: 13px"&gt;(); 
&lt;p style="text-align: left"&gt;webFlyPostBackManager.BlockPageUIOnBusy = &lt;span style="font-size: 13px; color: #0000ff"&gt;true&lt;/span&gt;&lt;span style="font-size: 13px"&gt;;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;span style="font-size: 13px; color: #0000ff"&gt;true&lt;/span&gt;&lt;span style="font-size: 13px"&gt;;&lt;/span&gt; &lt;p style="text-align: left"&gt;webFlyPostBackManager.ID = &lt;span style="font-size: 13px; color: #800000"&gt;"webFlyPostBackManager"&lt;/span&gt;&lt;span style="font-size: 13px"&gt;;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;span style="font-size: 13px; color: #800000"&gt;"webFlyPostBackManager"&lt;/span&gt;&lt;span style="font-size: 13px"&gt;;&lt;/span&gt; 
&lt;p style="text-align: left"&gt;&lt;span style="font-size: 13px"&gt;webFlyPostBackManager.IsDynamicCreated = &lt;/span&gt;&lt;span style="font-size: 13px; color: #0000ff"&gt;true&lt;/span&gt;&lt;span style="font-size: 13px"&gt;;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-align: left"&gt;&lt;span style="font-size: 13px"&gt;webFlyPostBackManager.ServiceUrl = &lt;/span&gt;&lt;span style="font-size: 13px; color: #800000"&gt;"~/Default.aspx"&lt;/span&gt;&lt;span style="font-size: 13px"&gt;; 
&lt;p style="text-align: left"&gt;webFlyPostBackManager.EnableUIMode = &lt;/p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-align: left"&gt;webFlyPostBackManager.EnableUIMode = &lt;/p&gt;

&lt;p style="text-align: left"&gt;webFlyPostBackManager.EnableUIMode = &lt;/p&gt;
&lt;p style="text-align: left"&gt;webFlyPostBackManager.EnableUIMode = &lt;/p&gt;
&lt;p style="text-align: left"&gt;&lt;span style="font-size: 13px"&gt;&lt;span style="font-size: 13px"&gt;Controls.Add( webFlyPostBackManager );&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-align: left"&gt; &lt;/p&gt;&lt;span style="font-size: 13px"&gt;&lt;span style="font-size: 13px"&gt;&lt;span style="font-size: 13px"&gt;&lt;p&gt;interSoftWebUIGrid.FlyPostBackSettings.PostHiddenFields = &lt;span style="font-size: 13px; color: #0000ff"&gt;true&lt;/span&gt;&lt;span style="font-size: 13px"&gt;; &lt;p&gt;interSoftWebUIGrid.FlyPostBackSettings.PostInputControls = &lt;span style="font-size: 13px; color: #0000ff"&gt;true&lt;/span&gt;&lt;span style="font-size: 13px"&gt;; &lt;p&gt;interSoftWebUIGrid.FlyPostBackSettings.PostViewState = &lt;span style="font-size: 13px; color: #0000ff"&gt;true&lt;/span&gt;&lt;span style="font-size: 13px"&gt;;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;interSoftWebUIGrid.FlyPostBackSettings.PostViewState = &lt;span style="font-size: 13px; color: #0000ff"&gt;true&lt;/span&gt;&lt;span style="font-size: 13px"&gt;;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;interSoftWebUIGrid.FlyPostBackSettings.PostViewState = &lt;span style="font-size: 13px; color: #0000ff"&gt;true&lt;/span&gt;&lt;span style="font-size: 13px"&gt;;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;interSoftWebUIGrid.FlyPostBackSettings.PostInputControls = &lt;span style="font-size: 13px; color: #0000ff"&gt;true&lt;/span&gt;&lt;span style="font-size: 13px"&gt;; &lt;p&gt;interSoftWebUIGrid.FlyPostBackSettings.PostViewState = &lt;span style="font-size: 13px; color: #0000ff"&gt;true&lt;/span&gt;&lt;span style="font-size: 13px"&gt;;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;interSoftWebUIGrid.FlyPostBackSettings.PostViewState = &lt;span style="font-size: 13px; color: #0000ff"&gt;true&lt;/span&gt;&lt;span style="font-size: 13px"&gt;;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;interSoftWebUIGrid.FlyPostBackSettings.PostViewState = &lt;span style="font-size: 13px; color: #0000ff"&gt;true&lt;/span&gt;&lt;span style="font-size: 13px"&gt;;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;interSoftWebUIGrid.FlyPostBackSettings.PostInputControls = &lt;span style="font-size: 13px; color: #0000ff"&gt;true&lt;/span&gt;&lt;span style="font-size: 13px"&gt;; &lt;p&gt;interSoftWebUIGrid.FlyPostBackSettings.PostViewState = &lt;span style="font-size: 13px; color: #0000ff"&gt;true&lt;/span&gt;&lt;span style="font-size: 13px"&gt;;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;interSoftWebUIGrid.FlyPostBackSettings.PostViewState = &lt;span style="font-size: 13px; color: #0000ff"&gt;true&lt;/span&gt;&lt;span style="font-size: 13px"&gt;;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;interSoftWebUIGrid.FlyPostBackSettings.PostViewState = &lt;span style="font-size: 13px; color: #0000ff"&gt;true&lt;/span&gt;&lt;span style="font-size: 13px"&gt;;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;span style="font-size: 13px; color: #0000ff"&gt;true&lt;/span&gt;&lt;span style="font-size: 13px"&gt;; &lt;p&gt;interSoftWebUIGrid.FlyPostBackSettings.PostInputControls = &lt;span style="font-size: 13px; color: #0000ff"&gt;true&lt;/span&gt;&lt;span style="font-size: 13px"&gt;; &lt;p&gt;interSoftWebUIGrid.FlyPostBackSettings.PostViewState = &lt;span style="font-size: 13px; color: #0000ff"&gt;true&lt;/span&gt;&lt;span style="font-size: 13px"&gt;;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;interSoftWebUIGrid.FlyPostBackSettings.PostViewState = &lt;span style="font-size: 13px; color: #0000ff"&gt;true&lt;/span&gt;&lt;span style="font-size: 13px"&gt;;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;interSoftWebUIGrid.FlyPostBackSettings.PostViewState = &lt;span style="font-size: 13px; color: #0000ff"&gt;true&lt;/span&gt;&lt;span style="font-size: 13px"&gt;;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;span style="font-size: 13px; color: #0000ff"&gt;true&lt;/span&gt;&lt;span style="font-size: 13px"&gt;; &lt;p&gt;interSoftWebUIGrid.FlyPostBackSettings.PostViewState = &lt;span style="font-size: 13px; color: #0000ff"&gt;true&lt;/span&gt;&lt;span style="font-size: 13px"&gt;;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;span style="font-size: 13px; color: #0000ff"&gt;true&lt;/span&gt;&lt;span style="font-size: 13px"&gt;;&lt;/span&gt; 
&lt;p&gt;&lt;span style="font-size: 13px"&gt;&lt;strong&gt;2. In WebPart code file &lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size: 13px"&gt;&lt;span style="font-size: 13px"&gt;[&lt;/span&gt;&lt;span style="font-size: 13px; color: #008080"&gt;WebFlyPostBackMethod&lt;/span&gt;&lt;span style="font-size: 13px"&gt;()] &lt;/span&gt;&lt;span style="font-size: 13px; color: #0000ff"&gt;public&lt;/span&gt;&lt;span style="font-size: 13px"&gt; &lt;/span&gt;&lt;span style="font-size: 13px; color: #0000ff"&gt;void&lt;/span&gt;&lt;span style="font-size: 13px"&gt; MyMethodName() 
&lt;p&gt;{&lt;/p&gt;&lt;span style="font-size: 13px"&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;interSoftWebUIGrid.ClearCachedDataSource();&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; interSoftWebUIGrid.RebindDataSource(); &lt;/p&gt;&lt;span style="font-size: 13px"&gt;
&lt;p&gt;    webFlyPostBackManager.ClientAction.UpdateViewState();&lt;/p&gt;
&lt;p&gt;    webFlyPostBackManager.ClientAction.RenderControl( interSoftWebUIGrid);&lt;/p&gt;&lt;/span&gt;&lt;/span&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;3. In JavaScript&lt;/p&gt;&lt;span style="font-size: 13px; color: #0000ff"&gt;function&lt;/span&gt;&lt;span style="font-size: 13px"&gt; ClientSideShowNextTimePeriodData(objWebFlyPostBackManager) &lt;p&gt;{&lt;/p&gt;&lt;/span&gt;&lt;span style="font-size: 13px; color: #0000ff"&gt;      var&lt;/span&gt;&lt;span style="font-size: 13px"&gt; fpb = ISGetObject(objWebFlyPostBackManager); &lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fpb.ShowNextTimePeriodData(); &lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 12pt"&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&lt;span style="font-size: 10pt"&gt;Above line gives an error saying Error: Object doesn't support this property or method&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Any idea why i am not able to get this method on client side even after adding the required attribute to it ?&lt;/p&gt;&lt;p&gt;Can you please send us a small SharePoint web part example for doing this ?&lt;/p&gt;&lt;p&gt;Thank you.&lt;/p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;</description></item></channel></rss>