Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Why is my Edit page showing up?Why is my Edit page showing up?
Previous
 
Next
New Post
2/10/2009 2:50 PM
 

Hello,

 

I am writing a module with a view page and an edit page.  These are specified accordingly in the config file.  When I add the module to a page I am seeing both of the controls, and then when i make a link to the EditUrl() I get no controls at all.

The config looks like:

<dotnetnuke version="3.0" type="Module">
  <folders>
    <folder>
      <name>Certification</name>
      <friendlyname>Certification</friendlyname>
      <foldername>Certification</foldername>
      <modulename>Certification</modulename>
      <description>The Certification Test</description>
      <version>01.00.00</version>
      <businesscontrollerclass>cert_controller</businesscontrollerclass>
      <modules>
        <module>
          <friendlyname>Main View</friendlyname>
          <cachetime>0</cachetime>
          <controls>
            <control>
              <src>DesktopModules/Certification/cert_main.ascx</src>
              <type>View</type>
            </control>
          </controls>
        </module>
         <module>
            <friendlyname>Edit View</friendlyname>
            <cachetime>0</cachetime>
            <controls>
               <control>
                  <src>DesktopModules/Certification/cert_admin.ascx</src>
                  <type>Edit</type>
               </control>
            </controls>
         </module>
      </modules>
      <files>
        <file>
          <path>Providers\DataProviders\SqlDataProvider</path>
          <name>01.00.00.SqlDataProvider</name>
        </file>
        <file>
          <name>cert_admin.ascx</name>
        </file>
        <file>
          <name>cert_admin.ascx.cs</name>
        </file>
        <file>
          <name>cert_main.ascx</name>
        </file>
        <file>
          <name>cert_main.ascx.cs</name>
        </file>
        <file>
          <name>module.css</name>
        </file>
        <file>
          <name>Uninstall.SqlDataProvider</name>
        </file>
        <file>
          <path>[app_code]</path>
          <name>cert_controller.cs</name>
        </file>
        <file>
          <path>[app_code]</path>
          <name>cert_info.cs</name>
        </file>
      </files>
    </folder>
  </folders>
</dotnetnuke>

Thanks,

John
 
New Post
2/10/2009 4:00 PM
 

You have defined them as different modules (ModuleDefinitions in the database), when they should be in the same module, just different controls (ModuleControls in the database).

You'll want something like this:

   1:        <modules>
   2:          <module>
   3:            <friendlyname>Certification</friendlyname>
   4:            <cachetime>0</cachetime>
   5:            <controls>
   6:              <control>
   7:                <src>DesktopModules/Certification/cert_main.ascx</src>
   8:                <type>View</type>
   9:              </control>
  10:              <control>
  11:                <src>DesktopModules/Certification/cert_admin.ascx</src>
  12:                <type>Edit</type>
  13:                <key>Edit</key>
  14:              </control>
  15:            </controls>
  16:          </module>
  17:        </modules>

You'll also want to define the edit control's key as Edit (as in line 13).  Using EditUrl() assumes you want the edit control with the Edit key.  Only one control in your module should be without a key, that's the control that shows by default.

Hope that helps,


Brian Dukes
Engage Software
St. Louis, MO
866-907-4002
DNN partner specializing in custom, enterprise DNN development.
 
New Post
2/10/2009 4:08 PM
 

Wow, huge mistakes.  That's what I get for copy and pasting. 

 

Thank you for your help.

 

John

 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Why is my Edit page showing up?Why is my Edit page showing up?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out