.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

How to display a modal dialog from a BCS entity action?

Posted By:      Posted Date: September 21, 2010    Points: 0   Category :SharePoint

I have implemented a BCS entity action which displays an aspx page to display some entity specific data. I want this aspx page to appear in a modal dialog using the new SharePoint 2010 dialog framework.

As far as I can tell, this is only possible via JS using SP.UI.ModalDialog.showModalDialog. But I don't seem to be able to call javascript from an entity action at all. I use entity.Actions.Create and action.ActionParameters.Create to create the entity action with the appropriate parameters. This works fine for my current aspx page, but this does not seem to work if the page should appear as modal dialog.

Any ideas how this can be achieved?


View Complete Post

More Related Resource Links

Cutting Edge: Modal Dialog Boxes with AJAX


This month Dino Esposito shows you how to get Windows-style modal dialog boxes for your Web applications thanks to the Ajax Control Toolkit and some clever coding.

Dino Esposito

MSDN Magazine Launch 2008

Closing Javascript Modal dialog window after server side event processing


Hello Friends..

Please tell me how to close Javascript ModelDoalog Window.. after Server Side event Processing .

Basically i want close window in  finally Block After sucessfulll Updation.

AMit..... InnocentInnocentInnocentInnocentInnocentInnocentInnocent

Somehow to pass a value to a action without having it on display in url?


Hi. I really cant figure this out but so I thought I would ask you. My scenario is I'm listing customers with paging. Lets say Im on page 4 and I choose to edit a customer. What I want to do is to be able to return to that page 4 when Im done editing the customer. How should I approach this?

Refreshing a Jquery modal dialog after closing another Jquery modal dialog


I have one aspx page which contains a webpart. The structure of the webpart is:

Webpart(holds one user control say UC1)

      UC1-> contains another user control say (UC2) in a <div>, which I am going to show as a popup on clicking of a link button inside a gridview in UC1.

      UC2-> contain another user control say (UC3) in a <div>, which I am going to show as a popup on clicking of a button inside in UC2.

That means -> UC1(main page) ------->(Onclick) One JQuery popup(UC2)--------------->(OnClick) One Jquery popup(UC3) here UC2 is still remaining in focus and UC3 will be another Jquery popup on UC2.

Now my requirement is when i fill the Jquery popup(UC3) and click on save button in UC3, I would like to close UC3 Jquery popup and refresh the gridview inside UC2 Jquery popup without closing it.

Is this possible?(please explain the logic if found in terms of Jquery, but not in terms of normal popup windows)

Did anything change with modal dialog override GetCustomBuilder() in 2010?

I have several web parts in 2007 that override the GetCustomBuilder() method with the HtmlDesignerAttribute set to BrowserBuilderType.Dynamic in order to call aspx pages for custom UI on webbrowsable properties when you click the "..." in the EditorPart rather than just launching the default text area modal dialog. From http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webpartpages.webpart.getcustombuilder.aspx it looks like everything is supposed to work the same way in 2010. But it's not. No matter what I've tried, the only thing I can get to load is the standard _layouts/zoombldr.aspx dialog. I even tried making a clone of zoombldr.aspx (named test.aspx), added another button to tell the difference and call it explicitly, but it didn't load. I've debugged and am confident GetCustomBuilder() is returning correct URLs to the custom aspx pages (and they load fine when requested directly). I've searched hi and lo without success in finding a solution. Any ideas? Many thanks!

WPF Window as Modal Dialog, strange behavior

Hopefully someone has a clue.... My application displays WPF Window as a modal dialog box. The dialog box has a few child user controls, one of which has combo box. When the user clicks this combo box to select... the whole dialog disappears except of the innards of the combo box. So the user only sees the list box of the combo box. Here are the details I got from the  client: The window itself is launched from non WPF application (Lotus Notes). This happens only on a few machines. The OS is Windows XP SP3. There is no issue with the parent handle, windows owner, etc... I've seen this behavior during the development phase, only when running under a debugger.    Thanks, Michael        

Custom Edit form - close modal dialog and navigate to page

Hi, I created one custom edit form for my document library, replaced default save and cancel buttons with input buttons and added the form action to them. Then I set my page as default edit form. When I click edit button, my custom form opens in modal pop up. When I try to save the item by clicking new save button, item gets saved but pop remains as it is. Now, I want the modal pop up to get closed and navigate to page other than the parent page with some parameters after I click save button. How can I achieve this? Thanks!!

reCaptcha+jquery ui modal dialog

Hi, I would like to have a contact form which contains a reCaptcha, and have that form inside a jquery ui modal dialog. All works well, except that I have a submit button for the form - which closes the modal dialog wether the recaptcha is valid or invalid. I tried adding onClientClick="return false;" to the submit button, but it still posts back, and closes the dialog. how do I remain inside the dialog ?

Refresh Parent Page List after Edit Item Modal Dialog Save/Close

I am calling the Edit Item URL (EditForm.aspx?ID=x&IsDlg=1) via javascript code to bring up the Edit Item Modal Dialog. This works fine and dandy. But what callbackfunction should I invoke after the Save so that the parent list is refreshed? Is there a better way to do it than call reload on the entire parent frame? It almost looks like there should be a way to refresh just the list. Any help appreciated. Thanks, Jake.

microsoft visual studio cannot shut down because a modal dialog is active

if i get this message one more time I am going to put my fist through my monitor

How to display image from database using MVC2 & Entity framework.



I am very new to MVC and entity I have being searching all over the internet on how to do this. Please help.

I need to do a site similar to http://weblogs.asp.net/scottgu/archive/2007/11/13/asp-net-mvc-framework-part-1.aspx but don't know how to display or retrieve the images as in the above website.

Thank you so much!

What factors into the calculation of the width of modal dialog windows? (problems with custom master


I have a fairly customized masterpage and while the modal dialog boxes seem fine in Chrome and IE, they aren't rendering wide enough in firefox causing them to need to be horizontally scrolled.

I've figured out that it's not my stylesheet because when I deactivate it the problem still remains. When I try going back to v4.master it also works fine, so I'm mostly positive it's my masterpage.

I've tried going through and removing various customizations but nothing seems to resolve the issue. I'm thinking it may be related to the ribbon which I have detached from the top of the page.

I'm hoping if someone knows how the width of the modal window is calculated I might be able to track down the bug.

I wish I could just set the modal windows to use a different masterpage all together or have more easily accessible css. Maybe Sharepoint 2012? :)

Display a form as a dialog and then display a messagebox on top


This is the code in my form1

public partial class Form1 : Form
    public Form1()

    private void button1_Click(object sender, EventArgs e)
      using (Form2 dialog = new Form2())
        var result = dialog.ShowDialog(this);
        if (result == System.Windows.Forms.DialogResult.OK)
          MessageBox.Show(this, "Test", "Test Caption", MessageBoxButtons.OK, MessageBoxIcon.Error);

And this is the code in my Form2

public partial class Form2 : Form
    public Form2()

Check out issue - authentication modal dialog on every checkout, Explorer View or Open With Windows



I got users that have an issue when trying to check out document, using the Explorer View or using Open With Windows Explorer.

Users are on Vista, IE 7 and Win 7, IE8

I have seen this Warning in the Application Event log:

"WMI ADAP was unable to retrieve data from the PerfLib subkey: SYSTEM\CurrentControlSet\Services\SSO\Performance\Library, error code: 0x80041009"

Any help would be very much appreciated!


SharePoint 2010 Modal dialog & Silverlight



I've got a silverlight application on my sharepoint site which open a ModalDialog.

This code adds JavaScript code to html :

    private void RegisterJavaScript()
      var script = HtmlPage.Document.CreateElement("script");
      script.SetAttribute("type", "text/javascript");

      var sb = new StringBuilder();
      sb.AppendLine("function showMyModalDialog(){");
      sb.AppendLine("  var options = {");
      sb.AppendLine("    url: '/Pages/Test.aspx',");
      sb.AppendLine("    width: 600,");
      sb.AppendLine("    height: 300,");
      sb.AppendLine("    dialogReturnValueCallback: DialogCallback,");
      sb.AppendLine("    allowMaximize: false,");

Hide Modal Dialog Close Button when dialog is already shown


Hey everyone,


Was wondering, how do you hide the close button of a modal dialog, when it's already shown, i.e. the page that's being loaded into the dialog, in there is a web part, and i want to trigger a script call to hide the close button of the current modal container.

I know you could give options to the modal dialog when you shot it to hide the close button, but not sure if you can do it after it has shown. I have no control of adding the option when it's showing the dialog, as this is done by the Add new item link in a list.




How to close the sharepoint modal dialog and refresh the parent page using Server side API?

I am trying to find a way to close a modal page that has been opened with the click event of ribbon control. Once the modal dialog is opened, I'm showing 'OK' button for the user to confirm some action on the respective list item. If the user clicks on 'OK', I'm performing some action on the listitem using server side code. Here the problem for me is, once the action is completed on this listItem, I need to close the dialog and refresh the parent page (AllItem.aspx) using *sharepoint server side

I'm aware that for closing the dialog we have JS code "SP.UI.ModalDialog.commonModalDialogClose". But this is not useful for me, because I should first run some action on the listitem and once that action is complete, then only I should close this dialog.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend