You could use some type of ViewState("FLAG") that you look for before
populating the dropdown. If the ViewState("FLAG") <> False or something
like that you could decide from that. My understanding of the ViewState()
container is that it's the best way to preserve state between postbacks.
Hope this helps.
Tom Fuller
-----Original Message-----
From: Rich K [mailto:rich@r...]
Sent: Monday, October 07, 2002 4:45 PM
To: ASPX_Professional
Subject: [aspx_professional] DropDownList question
Could someone tell me how I can resolve the following situation.
I have a dropdown that is populated from information in a database. I
populate the list in a sub routine only if a selected button is pressed. The
list only needs to be populated once(1000 records). How do I populate the
list only once? I guess i am trying to mimick the if is not postback used in
a page_load event in a sub routine. Is this possible? Thanks for your help
in advance. Rich.
---
ASP.NET 1.0 Namespace Reference with C#
http://www.wrox.com/acon11.asp?ISBN=1861007442
ASP.NET 1.0 Namespace Reference with VB.NET
http://www.wrox.com/acon11.asp?ISBN=1861007450
These books are a complete reference to the ASP.NET namespaces
for developers who are already familiar with using ASP.NET.
There is no trivial introductory material or useless .NET
hype and the presentation of the namespaces, in an easy-to use
alphabetical order ensures a user-friendly reference format.
We provide in-depth coverage of all the major ASP.NET classes,
giving you those real-world tips that the documentation doesn't
offer, and demonstrating complex techniques with simple
examples.
---