Hi there,
I've searched quite a bit for a tutorial in building a simple module to ultilize the DNNtree. It doesn't help that I'm still new to using ASP.NET. I use Visual Studio Web Developer 2008 Express with SQL Server 2005.
I've followed tutorials to create and build simple modules so I'm farmiliar with this process.
One area I seem to be struggling in is how can I access my SQL connection via the module, I've barely done any database connections in my .NET learning at the moment. I'm farmiliar with dragging an instance of the <asp:SqlDataSource>, however when I create a datasource on the modules aspx page and tried to assosiate that data source with a tree view it throws a long error, the first line says "DotNetNuke.Services.Exceptions.ModuleLoadException: The 'DataSource' property cannot be set declaratively"
Secondly how can I access my portals navigation based on the users security settings?
I suppose once I successfully fetch the datasource I would need to build a query? I believe the [Tabs] table holds the pages data? However I'm not great at SQL queries can anyone help as to how I add a conditional clause to only display what the user is supposed to view?
I think I can work out the rest once I've found the data, I primarily work on front-end development so I need a module which pulls the correct data in which I can style.
We originally had a freelancer who wrote a custom module, the module would populate .NET's TreeView with the child pages of the selected menu, the problem is it pulled all pages regardless of the visibility rights. So admin pages were visible to everyone as an example. The Class containing the method that pulled the results from the database was already compiled to a dll file and I'm not sure how to amend the query he wrote. Besides I figured it would be a nice learning curve to build the simple module from scratch :)
Preferably I'd like to do this in C# but I'm happy to work with VB, I just a little less knowledge in writing in VB.
Many thanks,
Chris