I have an usercontrol class whereby I bubble click methods back to the parent ASPX page to dynamically load other usercontrols (much like a wizard).
As the moment I simply call OnBubbleClick(nextUserCont
rolName); which is caught back on the aspx and loads the next control to the updatepanel
Now a couple of my usercontrols now require different variables to be set. For example I have a Page.ascx where I want to pass across a ID field to pull the relevant text from a database and also and Error.ascx where I will pass an error message and error dump to be displayed.
I have been thinking of the best way about this and thought about changing the OnBubbleClick(nextUserCont
rolName) to be;
OnBubbleClick(string nextUserControlToLoad, string[,] args)
so in this situation i would just pass string['ID', '2'] and in the page load for the page.ascx test for the ID field being present
in the error case string['message', 'error message', 'dump', 'error dump']
does this sound the best way of going about things?
Also, in this case how would I 'search' the array on the page load? and would this have any impact on performance from say, creating types and test for these?