Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8025235
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T23:06:05+00:00 2026-06-04T23:06:05+00:00

I have a module on C# for DNN, the purpose is to display a

  • 0

I have a module on C# for DNN, the purpose is to display a list of customers and allow only people from certain groups to see the page and their data. this is my ascx file for the view part

<%@ Control Language="C#" Inherits="OnCoreNet.Modules.CFT_Manager.ViewCFT_Manager"
AutoEventWireup="true" CodeBehind="ViewCFT_Manager.ascx.cs" %>
<asp:GridView ID="customerGrid" runat="server" EnableModelValidation="True" 
    Width="100%" AllowPaging="True" AutoGenerateColumns="False" 
    PagerSettings-Mode="NumericFirstLast" 
PagerSettings-PageButtonCount="10" 
onpageindexchanging="customerGrid_PageIndexChanging" 
onrowdatabound="customerGrid_RowDataBound">
    <Columns>
        <asp:BoundField HeaderStyle-Width="50px" ItemStyle-HorizontalAlign="Center" />
        <asp:BoundField ConvertEmptyStringToNull="False" HeaderText="Cust. Name" 
            NullDisplayText=" " ReadOnly="True" DataField="CFT_CustomerName" />
        <asp:BoundField ConvertEmptyStringToNull="False" DataField="CFT_CustomerKey" 
            HeaderText="Cust. Key" NullDisplayText=" " ReadOnly="True" HeaderStyle-Width="100px" />
        <asp:BoundField ConvertEmptyStringToNull="False" DataField="CFT_CustomerCode" 
            HeaderText="Cust. Code" NullDisplayText=" " ReadOnly="True" HeaderStyle-Width="100px" />
    </Columns>
</asp:GridView>

On the first cell I display 2 icons for edit and delete, with this code:

        protected void customerGrid_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {

            CFT_ManagerInfo customerInfo = (CFT_ManagerInfo)e.Row.DataItem;

            e.Row.Cells[0].Controls.Clear();

            ImageButton imgEdit = new ImageButton();
            imgEdit.ImageUrl = "/images/edit.gif";
            imgEdit.PostBackUrl = EditUrl("CFT_ID", customerInfo.CFT_ID.ToString());
            imgEdit.CommandName = "EditCustomerBtn";
            e.Row.Cells[0].Controls.Add(imgEdit);

            ImageButton imgDel = new ImageButton();
            imgDel.ImageUrl = "/images/delete.gif";
            imgEdit.PostBackUrl = EditUrl("CFT_Customer_ID", customerInfo.CFT_ID.ToString(), "DelCustomer");
            imgEdit.CommandName = "DelCustomerBtn";
            e.Row.Cells[0].Controls.Add(imgDel);

            Response.Write("Image URL: " + imgEdit.PostBackUrl + "<br>\n");
            Response.Write("Image URL: " + imgDel.PostBackUrl + "<br>\n");

            //Response.Write("CFT_ID: " + customerInfo.CFT_ID.ToString() + "<br>\n");
        }
    }

The images are displayed, but if I click on the icon it sends me an error, these are the links that EditUrl is sending:

http://localhost/CFTTest/tabid/88/ctl/DelCustomer/mid/415/CFT_Customer_ID/11/Default.aspx

The arget page is called EditCFT_Manager.ascx, that’s the defulat name VS gave it.
I don’t know what I’m doing wrong, I’m fairly new on DNN module development.. can you help me out please?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T23:06:07+00:00Added an answer on June 4, 2026 at 11:06 pm

    Using EditUrl to create the URL, DNN will look for a control in the module’s definition with the given key, either DelCustomer or Edit (since you didn’t specify the key). Assuming that you have a module manifest, you should be able to see where the main view control is defined, and copy it for those two keys, to point them to the user controls (see the Manifest – Module Component entry in the DNN wiki for details).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a module that is being used to create only a few page
I have a DotNetNuke Module created in DNN 4.9.2. It runs fine on my
I have a module where a global environment (defining certain constraints such as neighbor
I have a module in which I created a custom page with controller and
I'm working with DNN (DotNetNuke) and I have to change the default login module.
I have a client with dnn website. I need to develop module for it.
I am developing a slide show module for DNN, I have completed the module
I am new to DNN and working with custom module in DNN, I have
I'm trying to log calls from the UI (DNN module) to some of various
I have a module that uses ctypes to wrap some functionality from a static

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.