yes class, no modules (modules are not object orientated, avoid them if you care about this sort of thing)
Here is how to do this with codebehind.
What you can do is create a base class, that your current page will inherit, then this new class will inherit System.Web.UI.Page.
In this new baseclass, you can define your dropdownlist here, (take it out of the webdesigner code VS.net creates). You can also define any subs/functions you want to fill it here. Declare them as "Protected"
Then from your original codebehind pages, you just need to call these subs, and you've got it.
(Unfortunately doing it this way, though perfectly legal, will cause some bugs with visual studio to surface, the designer will still want to put the dropdownlist in the immediate code-behind file, I don't think there is anything you can do about this)
Hope this helps!
--Michael
"Big E" <no****@nospam.com> wrote in message news:OL**************@TK2MSFTNGP09.phx.gbl...
I'm using ASP.Net and SQL Server 2000. I have a dropdown list that is used
across many of my ASP.Net pages. On those pages I have a dropdown list that
has the same name as all the others. Instead of make a connection, a dataset
etc.. on every page I would like to have that piece of code that can run on
all the pages by just calling it. Would this be a Special class or module.
Any ideas?
Thanks.
Big E