Kariem Soudy's Blog

C#, ASP.NET, LINQ , and other interesting topics

  • Buttons inside facebox popup don't postback (fix)

    I was developing an asp.net page that has popups in facebox,

    one of these popups had a button with a postback behavior and code behind to execute,

    unfortunately the postback behavior didn't run properly,

    when i clicked that button it looked like a client side button with no postback behavior,

    after googling this problem with no results, i had to edit facebox.js file myself to get around this problem,

    here's the solution and explanation


    1. in facebox.js go to this line: $('body').append($.facebox.settings.faceboxHtml)

    2. replace it with $('#aspnetForm').append($.facebox.settings.faceboxHtml)

    that would fix the problem,


    if you look into facebox.js file, facebox appends the div that pops up inside the body of the page not inside the form,so clearly you should place that div inside the asp.net form to enable button's postback,


    Have fun...


  • What’s new in .NET Framework 4.0

    ·         Next versions of Windows Communication Foundation (WCF) and Windows Workflow Foundation (WF) will provide better support for Web 2.0 technologies like REST, POX, ATOM.

    ·         Performance and Scalability of WCF and WF are expected to increase by minimum 10X.

    ·         New workflow models.

    ·         Seamless integration between WCF and WF including a new Visual Designer.

    ·         Parallel Programming framework using PLINQ, Task Parallel Library and Coordination Data Structures to better utilize power of multi-processor and multi-core machines.

    ·         Build declarative applications with WF, WCF and WPF using XAML. So, XAML is no more only for WPF and WF.

    ·         WCF enhancements :

    o    RESTful enhancements

    §  Simplifying the building of REST Singleton & Collection Services, ATOM Feed and Publishing Protocol Services, and HTTP Plain XML Services using WCF

    §  WCF REST Starter Kit to be released on Codeplex to get early feedback

    o    Messaging enhancements

    §  Transports - UDP, MQ, Local in-process

    §  Protocols - SOAP over UDP, WS-Discovery, WS-BusinessActivity, WS-I BP 1.2

    §  Duplex durable messaging

    o    Correlation enhancements

    §  Content and context driven, One-way support

    o    Declarative Workflow Services

    §  Seamless integration between WF and WCF and unified XAML model

    §  Build entire application in XAML, from presentation to data to services to workflow

    ·         WF enhancements :

    o    Significant improvements in performance and scalability

    §  Ten-fold improvement in performance

    o    New workflow flow-control models and pre-built activities

    §  Flowcharts, rules

    §  Expanded built-in activities – PowerShell, database, messaging, etc.

    o    Enhancements in workflow modeling

    §  Persistence control, transaction flow, compensation support, data binding and scoping

    §  Rules composable and seamlessly integrated with workflow engine

    o    Updated visual designer

    §  Easier to use by end-users

    §  Easier to rehost by ISVs

    §  Ability to debug XAML

    ·         First CTP to be released during PDC in Oct 2008.

    ·         Information on this page will be updated as and when it is available.


  • C# 4.0: Dynamic Programming

    If C# 3.0 was all about Language Integrated Query (LINQ), then C# 4.0 is all about dynamic programming. What exactly does that mean? It means that C# 4.0 brings some of flexibility and declarative style of programming to C#.