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.0Assigning PortalID, ModuleID & UserIDAssigning PortalID, ModuleID & UserID
Previous
 
Next
New Post
7/26/2007 1:19 PM
 

 



Presently have plenty of modules that create tailored PortalID, ModuleID & UserID values.
Without this information, data is lost once the module has been deleted from page.

I figure that the PortalID & UserID are already established, since they are already in use.
Furthermore, so is the module, since it has already been dropped.
What I am wondering, is within my script or query how can I reference this data, which is already within database?

Traditional controller.vb names the command:    ModuleName.ModuleId

Looking for information to be put in with script or query.



This works (but without assigning unique values)


"INSERT INTO tablename (ModuleId, UserID, ClientName, Sum, Score, Product, Equip) VALUES (1,1,1,1,1,1,1)"


This is the first attempt at grabbing existing data from sql (missing something)

"INSERT INTO tablename (ModuleId, UserID, ClientName, Sum, Score, Product, Equip) VALUES (ModuleName.ModuleId,1,1,1,1,1,1)"


Might need a declaration outside of script in a location or two.  More informative the better.




Feedback Appreciated,


-Machina12 

 

 
New Post
7/26/2007 3:58 PM
 

ModuleID is just like PortalID.  It's a Public ReadOnly Property and you get it for free in your codebehind.  Just call ModuleID.  I don't think you can reference it directly in your stored procedure.  You'll want to use the DAL or DAL+ to send it to your stored proc.  Try something like:

        Private Sub cmdUpdate_Click(ByVal sender As Object, ByVal e As EventArgs) Handles cmdUpdate.Click
            Try
                Dim ctlMyData As New myDataController

                Dim objmMData As myInfo = New myDataInfo

                objmyData.ModuleId = ModuleId
                objmyData.ItemId = ItemId
                objmyData.PortalID = PortalID
                objmyData.UserID = UserInfo.UserID

                If Common.Utilities.Null.IsNull(ItemId) Then
                    ' add the content within the MyData table
                    objMyData.AddMyData(objMyData)
                Else
                    ' update the content within the IDPBuilder table
                    objMyData.UpdateMyData(objMyData)
                End If

                ' Redirect back to the portal home page
                Response.Redirect(NavigateURL(), True)
            Catch exc As Exception    'Module failed to load
                ProcessModuleLoadException(Me, exc)
            End Try
        End Sub

You should be able to find step by step instructions pretty close to this in the tutorials at the top of this forum.

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Assigning PortalID, ModuleID & UserIDAssigning PortalID, ModuleID & UserID


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