What're good ways to have Partial View Macros talk to eachother?
Maybe I'm going about this wrong, but I'm trying to create 2 pieces:
1) Code to query some data from a certain SQL table (which could be one of many - it'd accept a SQL table as a parameter), and create a table, which will always look and act the same but will display whatever results come back from the query
2) Code to create a dropdown, the results of which filters the SQL query in (1) - this piece would accept the fieldname (and possibly table name, to get the possible values?) as a parameter
I'm used to Kentico CMS, where I'd create a set of web parts that take eachother's ID as a parameter, which would let them access the Page controls, find eachother, and call methods to edit eachothers' properties.
My guess is that in Umbraco I'd have to use ViewData to store/modify the set of filters, and then have (1) pick up the ViewData object and run the query. But it feels like I should instead be able to use (2) to call a method on (1) to update its Model, or something like that, rather than relying on an external object.
Am I missing something?
Also, if this is the wrong Category for this question, sorry - it wasn't clear to me where to put this.
Having Partial View Macros talk to eachother
What're good ways to have Partial View Macros talk to eachother?
Maybe I'm going about this wrong, but I'm trying to create 2 pieces:
1) Code to query some data from a certain SQL table (which could be one of many - it'd accept a SQL table as a parameter), and create a table, which will always look and act the same but will display whatever results come back from the query 2) Code to create a dropdown, the results of which filters the SQL query in (1) - this piece would accept the fieldname (and possibly table name, to get the possible values?) as a parameter
I'm used to Kentico CMS, where I'd create a set of web parts that take eachother's ID as a parameter, which would let them access the Page controls, find eachother, and call methods to edit eachothers' properties.
My guess is that in Umbraco I'd have to use ViewData to store/modify the set of filters, and then have (1) pick up the ViewData object and run the query. But it feels like I should instead be able to use (2) to call a method on (1) to update its Model, or something like that, rather than relying on an external object.
Am I missing something?
Also, if this is the wrong Category for this question, sorry - it wasn't clear to me where to put this.
is working on a reply...