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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Help this wanna-be DNN module developer - SiteMap ModuleHelp this wanna-be DNN module developer - SiteMap Module
Previous
 
Next
New Post
8/22/2008 12:22 PM
 

By new module do you mean the basic module or the instances of a module that you add to a page.

If you mean instances that you already added to the pages, then you should know that each  "Instance" has it's own record in the database and you cannot modify that by changing the modules's aspx/aspx.vb/dll files.

You can only change it in the editing mode of each instances or directly by modifying the data in the SQL tables.

 
New Post
8/22/2008 1:20 PM
 

TS:

ASP.Net is much more sophisticated than PHP.  This has many advantages that I cannot discuss here, the technologies behind ASP.Net at this point are very mature and the "new" development environment came out in 2005 (based on the version of Visual Studio that goes along with it for ASP.Net 2.0).  VS2008 basically adds features on top of what VS2005 introduced so not many surprises there.  Based on what you have written, you seem to be learning ASP.Net now, correct me if I'm wrong.  Doing DNN module development is not a good way to learn ASP.Net.  DNN is also a complex and sophisticated product that uses object oriented techniques as well as a modular approach to the development of additional functionality via "Custom Modules", these are ASP.Net User Controls actually.  This is really not the best way to learn ASP.Net if you don't have a solid programming background (I don't know, just my perception).  Yes, Microsoft keeps putting new technologies out the door but you don't have to learn or use all of them, DNN certainly does not, which is why it only requires ASP.Net 2.0.  If you would have followed the development of ASP.Net and Visual Studio.Net you would see that these tools have evolved for the better, believe me, things are easier now.  Also, learning ASP.Net (and DNN) by modifying a third party module, specially under WAP, will be very frustrating as you have noticed.

I would recommend you that before you tackle the module mods you get yourself one of those "Learn ASP.Net in 20 Days" books and go through it cover to cover so that you have the ASP.Net fundamentals.  Then study the excellent DNN tutorials by Michael Washington.  If you do this you will know what is going on with the mods to the module you want to do.

Carlos

 

 

 
New Post
8/25/2008 8:41 AM
 

I also recommend the Michael Washington's tutorials. I think I did all the ones that can be done without silverlight.

 
New Post
9/3/2008 10:48 AM
 

Ok, so I finally had a chance to spend a couple hours poking around the codes (after my whole family got sick for 2 weeks! geez...). I must admit I like this ASP.net developing environment. I like the syntax - For example, Me.DataList4.DataSource means "Ok. we'll dump this variale to my template file. The location is Datalist4. and yeah, that's Datasource.". Everytime I start typing something in the code,,, a sneaky drop-down menu coming up and tells me exactly what I can put (functions, variables, etc.). Everything is new to me and I like it a lot.

Anyway, my final goal for this project is to create the simple sitemap module, which displays all pages alphabetically. I got this so far.

 

and here are the codes. I basically stole..."cough" borrowed Michael's "SuperSimple" module. His code is calling a module table and load them all on the page. Instead, my code calls "Tabs" table.

 

SiteMapPlus.ascx

<%@ Control Language="VB" AutoEventWireup="false" CodeFile="SiteMapPlus.ascx.vb" Inherits="DesktopModules_SiteMapPlus" %>

<a>A</a>
<asp:DataList ID="DataList1" runat="server" DataKeyField="TabID">
    <ItemTemplate>
        <asp:HyperLink ID="TabNameLabel" runat="server" Text='<%# Eval("TabName") %>' NavigateUrl='<%# formatURL(Eval("TabID")) %>'></asp:HyperLink>
        <br />
    </ItemTemplate>
</asp:DataList>
<br />
<a>B</a>
<asp:DataList ID="DataList2" runat="server" DataKeyField="TabID">
    <ItemTemplate>
        <asp:HyperLink ID="TabNameLabel" runat="server" Text='<%# Eval("TabName") %>' NavigateUrl='<%# formatURL(Eval("TabID")) %>'></asp:HyperLink>
        <br />
    </ItemTemplate>
</asp:DataList>
<br />
<a>C</a>
<asp:DataList ID="DataList3" runat="server" DataKeyField="TabID">
    <ItemTemplate>
        <asp:HyperLink ID="TabNameLabel" runat="server" Text='<%# Eval("TabName") %>' NavigateUrl='<%# formatURL(Eval("TabID")) %>'></asp:HyperLink>
        <br />
    </ItemTemplate>
</asp:DataList>
<br />
<a>D</a>
<asp:DataList ID="DataList4" runat="server" DataKeyField="TabID">
    <ItemTemplate>
        <asp:HyperLink ID="TabNameLabel" runat="server" Text='<%# Eval("TabName") %>' NavigateUrl='<%# formatURL(Eval("TabID")) %>'></asp:HyperLink>
        <br />
    </ItemTemplate>
</asp:DataList>
<br />
<a>E</a>
<asp:DataList ID="DataList5" runat="server" DataKeyField="TabID">
    <ItemTemplate>
        <asp:HyperLink ID="TabNameLabel" runat="server" Text='<%# Eval("TabName") %>' NavigateUrl='<%# formatURL(Eval("TabID")) %>'></asp:HyperLink>
        <br />
    </ItemTemplate>
</asp:DataList>

SiteMapPlus.ascx.vb

Imports DotNetNuke
Imports System.Web.UI
Imports System.Collections.Generic
Imports System.Reflection
Imports DotNetNuke.Security.PortalSecurity

Partial Class DesktopModules_SiteMapPlus
    Inherits Entities.Modules.PortalModuleBase
 
    Protected Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        If Not Page.IsPostBack Then
            ShowDataPlus()
        End If

    End Sub

    Private Sub ShowDataPlus()
        Dim mySqlString As New StringBuilder()
        Dim SearchString As String = "a"
        mySqlString.Append("SELECT TabID,TabName ")
        mySqlString.Append("FROM {databaseOwner}{objectQualifier}Tabs ")
        mySqlString.Append("WHERE PortalID = '")
        mySqlString.Append(PortalSettings.ActiveTab.PortalID)
        mySqlString.Append("' AND ")
        mySqlString.Append("TabName like @SearchString + '%' ")
        mySqlString.Append("ORDER BY TabName ASC")

        Dim myParam As SqlParameter = New SqlParameter("@SearchString", SqlDbType.VarChar, 150)
        myParam.Value = SearchString

        Me.DataList1.DataSource = CType(DataProvider.Instance().ExecuteSQL(mySqlString.ToString(), myParam), IDataReader)
        Me.DataList1.DataBind()

        SearchString = "b"
        myParam.Value = SearchString
        Me.DataList2.DataSource = CType(DataProvider.Instance().ExecuteSQL(mySqlString.ToString(), myParam), IDataReader)
        Me.DataList2.DataBind()

        SearchString = "c"
        myParam.Value = SearchString
        Me.DataList3.DataSource = CType(DataProvider.Instance().ExecuteSQL(mySqlString.ToString(), myParam), IDataReader)
        Me.DataList3.DataBind()

        SearchString = "d"
        myParam.Value = SearchString
        Me.DataList4.DataSource = CType(DataProvider.Instance().ExecuteSQL(mySqlString.ToString(), myParam), IDataReader)
        Me.DataList4.DataBind()

        SearchString = "e"
        myParam.Value = SearchString
        Me.DataList5.DataSource = CType(DataProvider.Instance().ExecuteSQL(mySqlString.ToString(), myParam), IDataReader)
        Me.DataList5.DataBind()

    End Sub

    Public Function formatURL(ByVal strTabID As String) As String
        Return NavigateURL(Int32.Parse(strTabID))
    End Function

End Class

This works. I just have to add F-Z and done! However, I don't like how it looks in the code. My dream would be loading all tabs to multidimensional array and dump it into the template file.

UltimateTabArray[A]{"Action List", "A Page", "Ant page"}
UltimateTabArray[B]{"Boston Redsox","Bite me", "Bow"}
UltimateTabArray[C]{"Costume", "Cost", "Come to Vermont","contact Us"}
.... to be continue until Z and the rest (numbers, etc)

Then dump this array to the SiteMapPlus.ascx. I need to find out how I can dynamically generate <asp:DataList> tag Datalist1 through 27 or 28 so the template file is more simplier than my version above.

QUESTIONS:

1. How do I hide admin, host, and other unwanted tab hid from public? Does this have to access to tab permission table?
2. Can template file contain "If" statement? So I can display "Oops... no page under character Z" instead of a blank space.
3. Any other hint, tips,,,,

Forgive me my rough coding... I have no ASP.Net coding background at all.

 

>> Johnny

Yes, I liked his tutorials. Thoes tutorials are the first one I looked at it.

>>Carlos

Thank you for the suggestion, Carlos. However, I can't learn from books. I usually just tackle on the existing code and modify it & hack it.... and eventually I can understand the whole structure and its syntax. That's the only way I can learn stuff. hehe

This thread is MOVED to following location: http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/111/threadid/253233/scope/posts/Default.aspx

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Help this wanna-be DNN module developer - SiteMap ModuleHelp this wanna-be DNN module developer - SiteMap Module


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