I'm working on a project to syndicate library content with RSS.... and learn .NET, C#, and AJAX

Saturday, July 28, 2007

ListMaker Persistence

Earlier I mentioned that I had stuck a bunch of methods in Page_Load just to make things work, but that it didn't seem right, somehow. Also, throughout the code, I'm turning on and off panels to display the right controls.

I decided it was more elegant, albeit not ideal, to deal with all the panel manipulation and also the needed method calls on a per-control basis immediately in the Page_Load. Even if I had put all the controls into user controls, I'd still have to turn them on/off for different main control actions. NOTE: need to leave some of the panel manipulation in the control methods, for example, if it depends on the success of the operation. Might not hurt to map all controls and what should happen 1) always and 2) conditionals

Since some of my controls have auto-gen ids, such as img_btn_del, which might actually be img_btn_del1, img_btn_del2, etc., I got to use regular expressions, which is always a nice lift in the morning.

References


No comments: