K
kbutterly
Good morning all,
I am an experienced Web programmer, now learning ASP.net 2.0. I am
currently teaching myself how to create a custom control. I have the
control designed and it renders beautifully. The only problem I have
is that I would like to store some static data in this control. The
control is an address control and it has a dropdown for the state.
Since state names are static, it seems to me to be best practice to
store the names within the control. So, question #1 is: Is that truly
best practice?
If it is best practice, question #2a: Is there any advantage to storing
the data as an array and having the control loop as it renders versus
hardcoding all the renders for the <option> tags?
If it is NOT best practice, question #2b: What is the recommended
alternative?
As always, any ideas, resources, references, war stories, or good clean
jokes would be greatly appreciated.
Thanks,
Kathryn
I am an experienced Web programmer, now learning ASP.net 2.0. I am
currently teaching myself how to create a custom control. I have the
control designed and it renders beautifully. The only problem I have
is that I would like to store some static data in this control. The
control is an address control and it has a dropdown for the state.
Since state names are static, it seems to me to be best practice to
store the names within the control. So, question #1 is: Is that truly
best practice?
If it is best practice, question #2a: Is there any advantage to storing
the data as an array and having the control loop as it renders versus
hardcoding all the renders for the <option> tags?
If it is NOT best practice, question #2b: What is the recommended
alternative?
As always, any ideas, resources, references, war stories, or good clean
jokes would be greatly appreciated.
Thanks,
Kathryn