0

Hello this my first time using DotNetNuke website. i want to open a popup window of a page which will add or edit the data in the parent page depending on button click. this is the code i am using to open the window

<script type="text/javascript">
    $(document).ready(function () {
        $("#ancPopUp").click(function () {
            dnnModal.show("//localhost:8590/Contats/add-contact?" + '?popUp=true', false, 550, 950, false);return false;});});
</script>

it is working fine for the add, but i don't know how to pass command arguments to the page when edit button is clicked. here is my edit button:

<asp:Button runat="server" Text="Edit" CommandName="Modify" OnCommand="Unnamed_Command1" CommandArgument='<%#DataBinder.Eval(Container,"RowIndex")+";"+Eval("code")+";"+Eval("name") %>'/> 
Dania
  • 61
  • 1
  • 1
  • 5

1 Answers1

0

This is really going to vary by the Modules that are in use on the parent page.

Each module can have it's own way to edit content, so knowing which module you are trying to edit, and which ControlKey that module uses for editing will be key to building the links.

If a module uses the Edit controlkey, you can simply use the EditURL() method available in the base class PortalModuleBase, to get to the standard edit interface.

If you are trying to edit a particular "item" like an article in a module, most modules would then require you to pass in another parameter, like "articleid=1" to the URL in order to edit an existing item. Though, again, this will be unique to each module.

The standard approach to DNN is that if you want to edit a module, you navigate to that page and edit the module from there, not from a "child" page. Though I am sure you can eventually make that work, it won't follow the normal flow of a DNN site, and would likely lead to confusion for anyone who is familiar with DNN already.

Chris Hammond
  • 8,873
  • 1
  • 26
  • 34