Popup control with dll on webpage

I am developing an angle that will network and win, so I have this interface:

public interface IViewsManager
{
    ...
    void ShowMessage();
    ...
}

      

And I have a win implementation that calls popup control from another dll. My problem is that when I try to implement it for a web environment, I have to call the popup control from another DLL, and I would like to show the popup and the web page is disconnected with the "gray" layer, and I don't know how to do it.

The structure looks like this:

1) UI.Common

   a) IViewsManager

2) UI.Win

   a) ViewsManagerWin

3) UI.Web

   a) ViewsManagerWeb

4) UI.Controls

   a) PopupControlWin

   b) PopupControlWeb

5) Web Application

      

And from my web application, I call the IViewsManager.ShowMessage file and depending on the environment, it calls the appropriate popup control.

Please, any help would be appreciated. Thanks in advance.

+2


a source to share


4 answers


Thanks for the help, but I was creating controls more dynamically. I did this to solve my problem. I create a control on the fly (from the Infragistics package) and add it to the page form, this works fine from a separate DLL as well.



0


a source


I think you are a little confused ...

You cannot "Show page controls behind"

Essentially if you want to pop up in the dialog you can do so with the CLIENT-SIDE Javascript function, the aspx page code behind is behind the executed on the server, which means visually you can't do much at all if you want so that your host can see it and no one else.

There is another option to present a dialog and insert some form of plugin such as silverlight, flash or x active control in the page content and then load on load.

If my understanding of your situation is correct, you are trying to load, perhaps the active control x, and for this reason the active active control x is loaded, but it is empty (so it is not really loaded).

The usual suspects here boil down to activex registration and security.

Of course, I'm just assuming this is an active problem x.



Simply put...

opening a dialog on a web page is as easy as ...

<script>
    Alert("Hello world !!!");
</script>

      

If you want to take this further, you will need to render your dialog as html content, or learn a few magic tricks with javascript.

how would you integrate this hotel into your little infrastructure ... that's a whole different story. Since your code is a dll, you can easily refer to it.

Perhaps in your GetwebDialog () method (or whatever you call it), you can pass it an element or control on the page you want to insert your dialog into, and then just add a new instance of the user control to it.

Seems to be the safest / cleanest way to go to me.

+1


a source


An easy way to do this is with the jQuery dialog plugin . It has a modality property, if set to true will gray out based on the base web page and make the dialog popup modal.

0


a source


This is how I do it:

protected void DisplayAlert(string message)
    {
        ClientScript.RegisterStartupScript(this.GetType(), Guid.NewGuid().ToString(), string.Format("alert('{0}');", message.Replace("'", @"\'")), true);
    }

      

0


a source







All Articles