I didn't notice the parenthesis in: module.tostring() was missing, but fixed and still no luck storing values.
Seems like this module follows a different storing method than Westa suggested. I would like to know which way is easiest & most effective.
Here is the code that relates to storing moduleID and userID:
Imports DotNetNuke
Imports System.Web.UI
Imports System.Collections.Generic
Imports System.Reflection
Imports System.Data.SqlClient
Imports DotNetNuke.Security.PortalSecurity
Namespace YourCompany.Modules.ModuleName
Partial Class ViewModuleName
Inherits Entities.Modules.PortalModuleBase
Dim ModuleNameInfo_data As New ModuleNameInfo
Protected Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ShowData(txtSearch.Text)
If IsInRole("Registered Users") Or IsInRole("Administrators") Then
Add_My_Listing_LinkButton.Enabled = True
Else
Add_My_Listing_LinkButton.Text = "You must be a Registered User to add a Listing"
Add_My_Listing_LinkButton.Enabled = False
End If
If Not Page.IsPostBack Then
ShowData("")
End If
End Sub
Protected Sub SetModuleId(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.ObjectDataSourceSelectingEventArgs) Handles ObjectDataSource_ModuleName.Selecting
e.InputParameters("ModuleId") = ModuleId.ToString()
End Sub
Protected Sub InsertingItem(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.FormViewInsertEventArgs) Handles FormView1.ItemInserting
e.Values.Item("UserID") = Entities.Users.UserController.GetCurrentUserInfo.UserID
e.Values.Item("ModuleId") = ModuleId.ToString()
e.Values.Item("ID") = 0
End Sub
I will be trying your suggested code above and respond with what I find.
In the meantime, any light you can shed on this is appreciated.
-machina12