Thank you for any help you can provide. My URL looks like this:
http://localhost:49388/DotNetNuke/Home/tabid/36/ctl/ListDetails/mid/371/TableName/Modules/Default.aspx
However, I think the real issue is if Dynamic Data can be made to work if it can't control the .aspx page?
With DotNetNuke, it must load the DotNetNuke Default.aspx page. The DotNetNuke Default.aspx page then determines what .ascx controls (these are the DotNetNuke modules) to inject into the page.
From my notes you can see that I can load the tables that Dynamic Data sees and I can even navigate to a .ascx control that has a DynamicGrid or DynamicListView and get it to display data. I am only able to get it to do this much because I am basically setting all the information for the LinqDataSource control and binding the Dynamic Control (either the Dynamic GridView or DynamicListView) to it.
It appears that the point I am stopped is that Dyanmic Data will not allow me to tell it what the data source should be so all the other Dynamic Controls (like the FilterRepeater) cannot be set using this method. For example I get errors like:
System.Exception: The DynamicFilterRepeater 'FilterRepeater' doesn't have a TableName attribute, and one could not be inferred from the URL.
This code allowed me to at least stop it from throwing an error when I was navigating AWAY from the page (still throws the error when I navigate to the page):
protected void Page_Init(object sender, EventArgs e)
{
this.FilterRepeater.TableName = Request.QueryString["TableName"];
}
I spent about 6 hours trying to use the URL routing. I was even able to specify a .ascx like this:
<add actions="list,details" viewName="ListDetails" templateFile="../../DesktopModules/DynamicWebsite/ListDetailsTemplate.ascx"/>
and it actually went to the control then threw an error because it wasn't a .aspx page. I then realized that I could not use this "routing" at all (due to the fact that DotNetNuke must control the .aspx page) so I am trying to get Dynamic Data to work by just using it's Dynamic controls. I think I CAN get this to work but Dynamic Data needs to allow me to set the datasource for the controls.
Right now as far as I can get is to manually set the datasource on the LinqDataSource control and bind the DynamicGridView or DynamicListView to it. Anything else I try to do can't be done because I need a "hook" that will allow me to tell DynamicData what the DataContext or Tablename is.
Am I totally off here? It seems like it would not defeat the "purpose of Dynamic Data" if you allowed us to tell either the Dynamic Controls or the DynamicData.dll what the DataSource/TableName should be.
Now I could create a URL and set a patern but as you see the page must be the DotNetNuke "Default.aspx". In my sample URL above my table Name is "Modules". Could I put a "pattern" in the web.config that would be able to parse the querystring below and set the DataCountex and Table name correctly?
http://localhost:49388/DotNetNuke/Home/tabid/36/ctl/ListDetails/mid/371/TableName/Modules/Default.aspx
What is queryStringKeyPrefix? could that help me here?
------------------------------------------------------------
I want to eventually create a DotNetNuke module that will allow you to design a table and then it creates the table and the Linq to SQL file and then dynamically allows you to navigate and update and add and delete data from the tables. This could be done by a non-programmer. DotNEtNuke is the "key" because it already has the Admin security/ Ability to export a setup as a module that can then be installed on a production server ect. I can then make Admin screens that allow the end user to create and modify templates.
But this would have to run "inside" the DotNEtNuke portal and it must control the .aspx page. I think you guys assumed that the .Master page would allow use to still keep the look and feel of the rest of our site, but .ascx controls REALLY give us the full control we need.
Again, Thank you for any help. I'm just trying to throw real world stuff at you to help you make this the greatest thing since ASP.NET first came out