Greetings all...
I'm messing around with code generation and have run into an issue that I need some direction on. All input is welcome!
I can successfully generate an ASCX with all the Web Controls that I want but now I need to generate the .Designer file. I was hoping that in my generation logic after I finish generating the ASCX I could call a method passing in the code or a reference to the file and get what needs to be put into the .Designer file.
The Visual Studio IDE does just this -- when you write an ASCX in code (Source View) then switch to "Design View" you see the messages in the status line of the IDE that it's generating all the controls. I was hoping that there was a public method somewhere one of the .Net Classes but I have not been able to find anything. I'm guessing that what we see in the designer is something coded in the IDE that is not actually part of .Net itself.
My generation process uses an ASCX file as a template. The process loops through all the fields I want to create and adds the code to the ASCX. I know I could "templatize" the designer file and do something similar but that complicates my logic. I was hoping to leverage what the Visual Studio IDE does.
Has anyone else attempted this and/or have any suggestions?
Thanks,
Chuck R.