Skip Navigation LinksHome > Categories > Code from a Category

Developing Face book Application with .NET Using FBJS AJAX with ASP.NET/C#, Displaying Dialog with Dynamic Content and Using FBJS POPUP Dialogs with ASP.NET/C#



User Name: tippu
Name: King SheZ
Contact Me: www.datawebcoder.com/ContactUs.aspx
Home Page: www.datawebcoder.com
7 years of enterprise application development, so far in my career i have worked on enterprise web applications with millions of users,i have also worked on many integrations between applications, i h... [More]
Viewed Times: 3629
Add Date: 07/21/2011
Continuing from my last post, i will explain how to develop Developing Face book Application with .NET Using FBJS AJAX with ASP.NET/C# and Displaying Dialog with Dynamic Content and Using FBJS POPUP Dialogs with ASP.NET/C#.

One of the featured of FBML and FBJS is the ability to display standard dialogs (see above: Using FBJS Dialogs). We can use one of standard dialogs to display dynamic content, for example, the list of records from the SQL Server database:





To do this, first of all I needed to add a link to the main GridView (see above: Using with FBML).



So, when the user clicks on the "show...history" link in the main Grid, the application shows records from the database. In order to get anything back from the database or from the server-side, the application needs to "post-back." Fortunately, FBJS has built-in support for AJAX (see more at Mock AJAX). So, we can post-back to the server and patiently wait for a reply:



]]>

...where object_action_history.aspx is the ASP.NET page:





Basically, object_action_history.aspx, when it returns from ajax.post() to ajax.ondone(), gives nothing more than just a "rendered" GridView. Then, in JavaScript (FBJS) on ajax.ondone, we take that data and "shovel" it down Dialog.showMessage():

]]>

Thats it for this post, hopefully it will help you guys.

Post a Comment

Name: (Optional)
Email: (Optional, you can get an email if somebody replys your comments)*
Email me if somebody respons my comment below:
Details**:
Enter Text
as Below:
(case insensitive, if hard to read, click the "get a new one" button)
 
    
* Your email address will not be shared with any third parties for any reason.
** Maximum 1000 charactors.