Dot Net Sparks C#.NET,ASP.NET,ADO.NET,LINQ,AJAX,JavaScript,SharePoint

/ 2

Open application page in SharePoint 2010 dialog framework using Code-Behind

In the previous post, I have explained you how to open application page in SharePoint 2010 dialog framework, where we used the script with in web part i.e., .ascx.

In this post I will explain you how to open the same application page in dialog framework using code-behind model with some modifications to the previous solution.

Here, we gonna do only two things, first we will add an anchor tag with attributes id= “anchor” and runat=”server” in the SP2010DFWebPartUserControl.ascx, in order to have the access in the code-behind. Next, in the code-behind file, we write some JavaScript and assign it to script variable and register the script to emit on page load.