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

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsAnnouncementsAnnouncementsHow to convert developed web site to DNN site?How to convert developed web site to DNN site?
Previous
 
Next
New Post
7/18/2011 4:57 AM
 
Hi,

I want to convert my already developed website with code-behind coding follow  n-tire structure. so Is it possible to convert to DNN site. if yes than How?

I  know about that is convertable already developed site but  my coding how manage by DNN App_Code  such as datProvider, sqlDataProvider, info. and pageController etc.

Please tell me...

Thanks
Jitesh Dhuravala
 
New Post
7/18/2011 5:17 AM
 
if your existing site is comprised of ascx, I answered a similar question at http://www.dotnetnuke.com/Resources/Forums/forumid/108/threadid/423059/scope/posts.aspx a few days ago. As for dataprovider/sqldataprovider etc., that's just a code-pattern we use in the core, any valid asp.net code is perfectly fine so you can keep your application logic.

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
7/18/2011 5:34 AM
 
Thanks a lots,

Thanks for reply , I have  seen your post , i confused about my coding pattern how manage in dnn, bcoz i created Bunisess entity , Bissness Logic layer, Data Access Layer class library for each. and I just used reference for each in my code-behind page.

Which step may i follow to convert in DNN Module? when i create module its atomatically create in  App_code folder for this particular module Folder, so it is required to create all method or function in  manually? can DNN automattically create this one from my source code.

Please give me idea.....


Regards
Jitesh Dhuravala
 
New Post
7/19/2011 5:04 AM
 
The point I'm making is that you can code anyway you like - you can use WSP/WAP, your code can be all inline asp.net or can use BLL/DAL, none of it really matters to DotNetNuke. All the really matters to DotNetNuke is that any usercontrols that are loaded by it use PortalModuleBase so that it's aware of security/skinning etc.

Code that uses app_code is known as the WSP model (rather than WAP model which is more popular) - http://adefwebserver.com/dotnetnukehe... is an example of creating WSP modules fot DotNetNuke.

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
8/8/2011 2:54 AM
 
Hi,


Finally i got solution for my question, how to add already developed website content in DNN Module.

so, Here best solution for this question.....

Right-click on the "DesktopModules" folder and select "New Folder"
Name the folder "DevelopedSite"
Next, right-click on the "DevelopedSite" folder and select "Add New Item...
In the "Add New Item" box that opens:
  • Click on "Web User Control" under "Visual Studio Installed Templates".
  • Enter "DevelopedSite.ascx" in the "Name" box.
  • Make sure the "Place code in a separate file" box is checked.
  • Click the "Add" button.
  • The "DevelopedSite.ascx" file will be created in the "DevelopedSite" folder under the "DesktopModules" folder.
  • Clicking the "plus" icon next to the file will display the associated code behind file "DevelopedSite.ascx.vb" (or "DevelopedSite.ascx.cs").
  • Double-click on the "DevelopedSite.ascx" file and it will open up in the main editing window. Right now the page will be blank.Click the "Source" button at the bottom of the page to switch to source view.
  • Enter the following code:

    VB:

    <%@ Control Language="VB" AutoEventWireup="false" CodeFile="DevelopedSite.ascx.vb"
    Inherits="DesktopModules_DevelopedSite_DevelopedSite" %>
    Search:&nbsp;
    <asp:TextBox ID="txtSearch" runat="server"></asp:TextBox>&nbsp;
    <asp:Button ID="btnSearch" runat="server" Text="Button" /><br />
    <br /> 
    <asp:GridView ID="GridView1" runat="server">
    </asp:GridView>

    C#:

    <%@ Control Language="C#" AutoEventWireup="true" CodeFile="DevelopedSite.ascx.cs" Inherits="DesktopModules_DevelopedSite_DevelopedSite" %>
    Search:&nbsp;
    <asp:TextBox ID="txtSearch" runat="server"></asp:TextBox>&nbsp;
    <asp:Button ID="btnSearch" runat="server" Text="Button" OnClick="btnSearch_Click" /><br />
    <br /> 
    <asp:GridView ID="GridView1" runat="server">
    </asp:GridView>
    Click the "Design" button at the bottom of the page to switch to the design view.
  • Double-click on  "DevelopedSite.ascx.vb" (or "DevelopedSite.ascx.cs")
  • Replace all the code with the following code:
    VB:
    Imports DotNetNuke
    Imports System.Web.UI
    Imports System.Collections.Generic
    Imports System.Reflection
    Imports DotNetNuke.Security.PortalSecurity
    Partial Class DesktopModules_DevelopedSite_DevelopedSite
    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
     ShowData("")
    End If
     
    End Sub
    Protected Sub btnSearch_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSearch.Click
    ShowData(txtSearch.Text)
    End Sub
    Private Sub ShowData(ByVal SearchString As String)
    Dim mySqlString As New StringBuilder()
    mySqlString.Append("SELECT FriendlyName, Description ")
    mySqlString.Append("FROM {databaseOwner}{objectQualifier}DesktopModules ")
    mySqlString.Append("WHERE Description like '%' + @SearchString + '%' ")
    mySqlString.Append("ORDER BY FriendlyName")
    Dim myParam As SqlParameter = New SqlParameter("@SearchString", SqlDbType.VarChar, 150)
    myParam.Value = SearchString
    Me.GridView1.DataSource = CType(DataProvider.Instance().ExecuteSQL(mySqlString.ToString(), myParam), IDataReader)
    Me.GridView1.DataBind()
    End Sub
    End Class

    C#:

    using DotNetNuke;
    using System.Web.UI;
    using System.Text;
    using System.Collections.Generic;
    using System.Reflection;
    using DotNetNuke.Security;
    using System.Data.SqlClient;
    using System.Data;
    using DotNetNuke.Data;
     
    partial class DesktopModules_DevelopedSite_DevelopedSite: DotNetNuke.Entities.Modules.PortalModuleBase 
    { 
     protected void Page_Load(object sender, System.EventArgs e) {
     if (!Page.IsPostBack) 
     {
     ShowData("");
     }
     }
     
     protected void btnSearch_Click(object sender, System.EventArgs e) {
     ShowData(txtSearch.Text);
     }
     
     private void ShowData(string SearchString) {
     StringBuilder mySqlString = new StringBuilder();
     mySqlString.Append("SELECT FriendlyName, Description ");
     mySqlString.Append("FROM {databaseOwner}{objectQualifier}DesktopModules ");
     mySqlString.Append("WHERE Description like \'%\' + @SearchString + \'%\' ");
     mySqlString.Append("ORDER BY FriendlyName");
     SqlParameter myParam = new SqlParameter("@SearchString", SqlDbType.VarChar, 150);
     myParam.Value = SearchString;
     this.GridView1.DataSource = ((IDataReader)(DataProvider.Instance().ExecuteSQL(mySqlString.ToString(), myParam)));
     this.GridView1.DataBind();
     }
     
    }
  • Select BUILD from the menu bar and select "Build Page".
  • The page should build without errors.

Thanks for conversation.


Thanks & Regards
Jitesh Dhuravala
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsAnnouncementsAnnouncementsHow to convert developed web site to DNN site?How to convert developed web site to DNN site?


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