October 2001
Intermediate to advanced
376 pages
7h 3m
English
Now that you have created the control, let’s discuss some of the common pitfalls and problems that you can fall into when creating a server-side control.
The ViewState dictionary is a name/value pair that enables you to store state information across page requests. It can be thought of as a ScriptingDictionary from VB6. One of the important things to understand about the ViewState dictionary is that it simply is a hash table, just like the ScriptingDictionary. One very important difference, however, is that the ScriptingDictionary was not case-sensitive in terms of the key name used; the ViewState dictionary is.
For example, the following code would not work as you expect it to:
ViewState["MyKey"] == "Hello"; Response.Write(ViewState["mykey"]); ...
Read now
Unlock full access