Reputation: 12294
Is it possible that i can i place a check in my module code seeing where my module is installed. (contentpane or rightpane or leftpane).
Basically if it is installed in the left or right pane i want to bring only 3 records to the display in my gridview and if it is installed in contentpane i want to bring all the records to the display in my gridview. is it possible? maybe can someone share any different technique by which i can achieve the above scenario in my module code.
2) how can i get the module id by only modulename in my c# code?
Upvotes: 1
Views: 381
Reputation: 8543
You are looking for
PortalModuleBase.ModuleConfiguration.PaneName
Building a module in this way will couple it very tightly to a specific skin. ContentPane is the only pane name that is sure to exist. Skinners can make up any other pane names as they see fit.
Upvotes: 2
Reputation: 2746
You have a variety of options that I think would be better than having the module try to figure out what pane it is in:
Upvotes: 2
Reputation: 5806
[2] In your module, you can directly access ModuleID
because the base class PortalModuleBase
is already having that value.
and for 2 I am not sure but you can do me.parent.parent in debug mode because me.parent will be a container control and it's parent will be the pane. Casting it to pane may get it's name.
I don't know standard method to get that.
Upvotes: 1