-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
Copy pathStateBag.xml
1116 lines (1027 loc) · 67.7 KB
/
StateBag.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<Type Name="StateBag" FullName="System.Web.UI.StateBag">
<TypeSignature Language="C#" Value="public sealed class StateBag : System.Collections.IDictionary, System.Web.UI.IStateManager" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit StateBag extends System.Object implements class System.Collections.ICollection, class System.Collections.IDictionary, class System.Collections.IEnumerable, class System.Web.UI.IStateManager" />
<TypeSignature Language="DocId" Value="T:System.Web.UI.StateBag" />
<TypeSignature Language="VB.NET" Value="Public NotInheritable Class StateBag
Implements IDictionary, IStateManager" />
<TypeSignature Language="F#" Value="type StateBag = class
 interface IStateManager
 interface IDictionary
 interface ICollection
 interface IEnumerable" />
<TypeSignature Language="C++ CLI" Value="public ref class StateBag sealed : System::Collections::IDictionary, System::Web::UI::IStateManager" />
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.Collections.ICollection</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.Collections.IDictionary</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.Collections.IEnumerable</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.Web.UI.IStateManager</InterfaceName>
</Interface>
</Interfaces>
<Docs>
<summary>Manages the view state of ASP.NET server controls, including pages. This class cannot be inherited.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
View state for a page or control is the cumulative property values, or view, of that page or control. You can access this class through the <xref:System.Web.UI.Control.ViewState%2A?displayProperty=nameWithType> property. Controls can also store essential state information in control state, but that information is not stored as a <xref:System.Web.UI.StateBag> object.
This class is the primary storage mechanism for all HTML and Web server controls. It stores attribute/value pairs as strings associated with the control. It tracks changes to these attributes only after the <xref:System.Web.UI.Control.OnInit%2A> method is executed for a page request, and saves the changes to the page's or control's view state.
This class implements a dictionary, and you can add items to it or remove items from it as you would any dictionary object. For more information about data collections, such as dictionaries, see [Collections and Data Structures](/dotnet/standard/collections/).
## Examples
The following code example demonstrates a composite `Label` control that has `Text` and `FontSize` properties. These properties are saved to and retrieved from view state when the <xref:System.Web.UI.Control.Render%2A?displayProperty=nameWithType> method is called on the control.
[!code-csharp[SysWebUIControlViewState#1](~/snippets/csharp/VS_Snippets_WebNet/SysWebUIControlViewState/CS/controlviewstate.cs#1)]
[!code-vb[SysWebUIControlViewState#1](~/snippets/visualbasic/VS_Snippets_WebNet/SysWebUIControlViewState/VB/controlviewstate.vb#1)]
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.IStateManager" />
<altmember cref="T:System.Collections.IDictionary" />
<altmember cref="P:System.Web.UI.Control.ViewState" />
<altmember cref="T:System.Web.UI.AttributeCollection" />
<related type="Article" href="/dotnet/standard/collections/">Collections and Data Structures</related>
<related type="Article" href="https://learn.microsoft.com/previous-versions/aspnet/75x4ha6s(v=vs.100)">ASP.NET State Management Overview</related>
</Docs>
<Members>
<MemberGroup MemberName=".ctor">
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Web.UI.StateBag" /> class.</summary>
</Docs>
</MemberGroup>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public StateBag ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.StateBag.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:
 StateBag();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Web.UI.StateBag" /> class. This is the parameterless constructor for this class.</summary>
<remarks>To be added.</remarks>
<altmember cref="P:System.Web.UI.Control.ViewState" />
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public StateBag (bool ignoreCase);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(bool ignoreCase) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.StateBag.#ctor(System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (ignoreCase As Boolean)" />
<MemberSignature Language="F#" Value="new System.Web.UI.StateBag : bool -> System.Web.UI.StateBag" Usage="new System.Web.UI.StateBag ignoreCase" />
<MemberSignature Language="C++ CLI" Value="public:
 StateBag(bool ignoreCase);" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="ignoreCase" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="ignoreCase">
<see langword="true" /> to ignore case; otherwise, <see langword="false" />.</param>
<summary>Initializes a new instance of the <see cref="T:System.Web.UI.StateBag" /> class that allows stored state values to be case-insensitive.</summary>
<remarks>To be added.</remarks>
<altmember cref="P:System.Web.UI.Control.ViewState" />
</Docs>
</Member>
<Member MemberName="Add">
<MemberSignature Language="C#" Value="public System.Web.UI.StateItem Add (string key, object value);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.Web.UI.StateItem Add(string key, object value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.StateBag.Add(System.String,System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Function Add (key As String, value As Object) As StateItem" />
<MemberSignature Language="F#" Value="member this.Add : string * obj -> System.Web.UI.StateItem" Usage="stateBag.Add (key, value)" />
<MemberSignature Language="C++ CLI" Value="public:
 System::Web::UI::StateItem ^ Add(System::String ^ key, System::Object ^ value);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.UI.StateItem</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="key" Type="System.String" />
<Parameter Name="value" Type="System.Object" />
</Parameters>
<Docs>
<param name="key">The attribute name for the <see cref="T:System.Web.UI.StateItem" />.</param>
<param name="value">The value of the item to add to the <see cref="T:System.Web.UI.StateBag" />.</param>
<summary>Adds a new <see cref="T:System.Web.UI.StateItem" /> object to the <see cref="T:System.Web.UI.StateBag" /> object. If the item already exists in the <see cref="T:System.Web.UI.StateBag" /> object, this method updates the value of the item.</summary>
<returns>Returns a <see cref="T:System.Web.UI.StateItem" /> that represents the object added to view state.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates using the <xref:System.Web.UI.StateBag.Add%2A> method.
[!code-csharp[Web.UI.StateBag#3](~/snippets/csharp/VS_Snippets_WebNet/Web.UI.StateBag/CS/removecs.aspx#3)]
[!code-vb[Web.UI.StateBag#3](~/snippets/visualbasic/VS_Snippets_WebNet/Web.UI.StateBag/VB/removevb.aspx#3)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentException">
<paramref name="key" /> is <see langword="null" />.
-or-
The number of characters in <paramref name="key" /> is 0.</exception>
<altmember cref="P:System.Web.UI.StateBag.Item(System.String)" />
<altmember cref="M:System.Web.UI.StateBag.Clear" />
<altmember cref="M:System.Web.UI.StateBag.Remove(System.String)" />
<related type="Article" href="https://learn.microsoft.com/previous-versions/aspnet/z1hkazw7(v=vs.100)">ASP.NET State Management Recommendations</related>
</Docs>
</Member>
<Member MemberName="Clear">
<MemberSignature Language="C#" Value="public void Clear ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Clear() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.StateBag.Clear" />
<MemberSignature Language="VB.NET" Value="Public Sub Clear ()" />
<MemberSignature Language="F#" Value="abstract member Clear : unit -> unit
override this.Clear : unit -> unit" Usage="stateBag.Clear " />
<MemberSignature Language="C++ CLI" Value="public:
 virtual void Clear();" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Collections.IDictionary.Clear</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Removes all items from the current <see cref="T:System.Web.UI.StateBag" /> object.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates using the <xref:System.Web.UI.StateBag.Clear%2A> method.
[!code-csharp[StateBag_IStateManager_Sample1#4](~/snippets/csharp/VS_Snippets_WebNet/StateBag_IStateManager_Sample1/CS/ism_statebag_samples.cs#4)]
[!code-vb[StateBag_IStateManager_Sample1#4](~/snippets/visualbasic/VS_Snippets_WebNet/StateBag_IStateManager_Sample1/VB/ism_statebag_samples.vb#4)]
]]></format>
</remarks>
<altmember cref="M:System.Web.UI.StateBag.Remove(System.String)" />
<altmember cref="M:System.Web.UI.StateBag.Add(System.String,System.Object)" />
</Docs>
</Member>
<Member MemberName="Count">
<MemberSignature Language="C#" Value="public int Count { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 Count" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.StateBag.Count" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Count As Integer" />
<MemberSignature Language="F#" Value="member this.Count : int" Usage="System.Web.UI.StateBag.Count" />
<MemberSignature Language="C++ CLI" Value="public:
 property int Count { int get(); };" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.Collections.ICollection.Count</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the number of <see cref="T:System.Web.UI.StateItem" /> objects in the <see cref="T:System.Web.UI.StateBag" /> object.</summary>
<value>The number of items in the <see cref="T:System.Web.UI.StateBag" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates using the <xref:System.Web.UI.StateBag.Count%2A> property.
[!code-csharp[Web.UI.StateBag#2](~/snippets/csharp/VS_Snippets_WebNet/Web.UI.StateBag/CS/gotocs.aspx#2)]
[!code-vb[Web.UI.StateBag#2](~/snippets/visualbasic/VS_Snippets_WebNet/Web.UI.StateBag/VB/gotovb.aspx#2)]
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.Control.ViewState" />
</Docs>
</Member>
<Member MemberName="GetEnumerator">
<MemberSignature Language="C#" Value="public System.Collections.IDictionaryEnumerator GetEnumerator ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Collections.IDictionaryEnumerator GetEnumerator() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.StateBag.GetEnumerator" />
<MemberSignature Language="VB.NET" Value="Public Function GetEnumerator () As IDictionaryEnumerator" />
<MemberSignature Language="F#" Value="abstract member GetEnumerator : unit -> System.Collections.IDictionaryEnumerator
override this.GetEnumerator : unit -> System.Collections.IDictionaryEnumerator" Usage="stateBag.GetEnumerator " />
<MemberSignature Language="C++ CLI" Value="public:
 virtual System::Collections::IDictionaryEnumerator ^ GetEnumerator();" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Collections.IDictionary.GetEnumerator</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.IDictionaryEnumerator</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Returns an enumerator that iterates over all the key/value pairs of the <see cref="T:System.Web.UI.StateItem" /> objects stored in the <see cref="T:System.Web.UI.StateBag" /> object.</summary>
<returns>The enumerator to iterate through the state bag.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example demonstrates how to use the <xref:System.Web.UI.StateBag.GetEnumerator%2A> method.
[!code-csharp[StateItem_Samples1#3](~/snippets/csharp/VS_Snippets_WebNet/StateItem_Samples1/CS/stateitem_samples.cs.aspx#3)]
[!code-vb[StateItem_Samples1#3](~/snippets/visualbasic/VS_Snippets_WebNet/StateItem_Samples1/VB/stateitem_samples.vb.aspx#3)]
]]></format>
</remarks>
<altmember cref="T:System.Collections.IDictionaryEnumerator" />
</Docs>
</Member>
<Member MemberName="IsItemDirty">
<MemberSignature Language="C#" Value="public bool IsItemDirty (string key);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance bool IsItemDirty(string key) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.StateBag.IsItemDirty(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Function IsItemDirty (key As String) As Boolean" />
<MemberSignature Language="F#" Value="member this.IsItemDirty : string -> bool" Usage="stateBag.IsItemDirty key" />
<MemberSignature Language="C++ CLI" Value="public:
 bool IsItemDirty(System::String ^ key);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="key" Type="System.String" />
</Parameters>
<Docs>
<param name="key">The key of the item to check.</param>
<summary>Checks a <see cref="T:System.Web.UI.StateItem" /> object stored in the <see cref="T:System.Web.UI.StateBag" /> object to evaluate whether it has been modified since the call to <see cref="M:System.Web.UI.Control.TrackViewState" />.</summary>
<returns>
<see langword="true" /> if the item has been modified; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method also returns `false` if the `key` parameter does not exist in the <xref:System.Web.UI.StateBag> object.
## Examples
The following code example demonstrates using the <xref:System.Web.UI.StateBag.IsItemDirty%2A> method.
[!code-csharp[StateBag_IStateManager_Sample1#4](~/snippets/csharp/VS_Snippets_WebNet/StateBag_IStateManager_Sample1/CS/ism_statebag_samples.cs#4)]
[!code-vb[StateBag_IStateManager_Sample1#4](~/snippets/visualbasic/VS_Snippets_WebNet/StateBag_IStateManager_Sample1/VB/ism_statebag_samples.vb#4)]
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.Control.ViewState" />
</Docs>
</Member>
<Member MemberName="Item">
<MemberSignature Language="C#" Value="public object this[string key] { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance object Item(string)" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.StateBag.Item(System.String)" />
<MemberSignature Language="VB.NET" Value="Default Public Property Item(key As String) As Object" />
<MemberSignature Language="F#" Value="member this.Item(string) : obj with get, set" Usage="System.Web.UI.StateBag.Item" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Object ^ default[System::String ^] { System::Object ^ get(System::String ^ key); void set(System::String ^ key, System::Object ^ value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="key" Type="System.String" />
</Parameters>
<Docs>
<param name="key">The key for the item.</param>
<summary>Gets or sets the value of an item stored in the <see cref="T:System.Web.UI.StateBag" /> object.</summary>
<value>The specified item in the <see cref="T:System.Web.UI.StateBag" /> object.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Using this member is the simplest way to save and retrieve view-state values for a control or a page.
If an item is not already stored in the <xref:System.Web.UI.StateBag> object when you set this property, its key/value pair is added to the collection. If you set this property to `null` before the <xref:System.Web.UI.Control.TrackViewState%2A> method is called on an item, it is removed from the <xref:System.Web.UI.StateBag> object. Otherwise, when you set this property to `null` the key is saved to allow tracking of the item's view state.
## Examples
The following code example demonstrates a property that saves its name and value as a key/value pair to the <xref:System.Web.UI.Control.ViewState%2A?displayProperty=nameWithType> property. The <xref:System.Web.UI.Control.ViewState%2A> property is an instance of the <xref:System.Web.UI.StateBag> class.
[!code-csharp[SysWebUIControlViewState#2](~/snippets/csharp/VS_Snippets_WebNet/SysWebUIControlViewState/CS/controlviewstate.cs#2)]
[!code-vb[SysWebUIControlViewState#2](~/snippets/visualbasic/VS_Snippets_WebNet/SysWebUIControlViewState/VB/controlviewstate.vb#2)]
]]></format>
</remarks>
<altmember cref="M:System.Web.UI.StateBag.Add(System.String,System.Object)" />
<altmember cref="M:System.Web.UI.StateBag.Remove(System.String)" />
<altmember cref="P:System.Web.UI.Control.ViewState" />
<related type="Article" href="https://learn.microsoft.com/previous-versions/aspnet/z1hkazw7(v=vs.100)">ASP.NET State Management Recommendations</related>
</Docs>
</Member>
<Member MemberName="Keys">
<MemberSignature Language="C#" Value="public System.Collections.ICollection Keys { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Collections.ICollection Keys" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.StateBag.Keys" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Keys As ICollection" />
<MemberSignature Language="F#" Value="member this.Keys : System.Collections.ICollection" Usage="System.Web.UI.StateBag.Keys" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Collections::ICollection ^ Keys { System::Collections::ICollection ^ get(); };" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.Collections.IDictionary.Keys</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.ICollection</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a collection of keys representing the items in the <see cref="T:System.Web.UI.StateBag" /> object.</summary>
<value>The collection of keys.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
These keys are the names of the control properties. For example, if you created a `BGColor` property on a `Table` control that you customized, a `BGColor` entry is created in this collection representing that property on your `Table` control.
These keys correspond to the names of the <xref:System.Web.UI.StateItem> objects stored in the <xref:System.Web.UI.StateBag> collection for the current page or server control.
You can iterate over this collection using the <xref:System.Web.UI.StateBag.GetEnumerator%2A?displayProperty=nameWithType> method.
## Examples
The following code example demonstrates using the <xref:System.Web.UI.StateBag.Keys%2A> property.
[!code-csharp[Web.UI.StateBag#2](~/snippets/csharp/VS_Snippets_WebNet/Web.UI.StateBag/CS/gotocs.aspx#2)]
[!code-vb[Web.UI.StateBag#2](~/snippets/visualbasic/VS_Snippets_WebNet/Web.UI.StateBag/VB/gotovb.aspx#2)]
]]></format>
</remarks>
<altmember cref="T:System.Collections.ICollection" />
<altmember cref="P:System.Web.UI.Control.ViewState" />
</Docs>
</Member>
<Member MemberName="Remove">
<MemberSignature Language="C#" Value="public void Remove (string key);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Remove(string key) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.StateBag.Remove(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Sub Remove (key As String)" />
<MemberSignature Language="F#" Value="member this.Remove : string -> unit" Usage="stateBag.Remove key" />
<MemberSignature Language="C++ CLI" Value="public:
 void Remove(System::String ^ key);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="key" Type="System.String" />
</Parameters>
<Docs>
<param name="key">The item to remove.</param>
<summary>Removes the specified key/value pair from the <see cref="T:System.Web.UI.StateBag" /> object.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates using the <xref:System.Web.UI.StateBag.Remove%2A> method.
[!code-csharp[Web.UI.StateBag#3](~/snippets/csharp/VS_Snippets_WebNet/Web.UI.StateBag/CS/removecs.aspx#3)]
[!code-vb[Web.UI.StateBag#3](~/snippets/visualbasic/VS_Snippets_WebNet/Web.UI.StateBag/VB/removevb.aspx#3)]
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.Control.ViewState" />
<altmember cref="M:System.Web.UI.StateBag.Clear" />
<altmember cref="P:System.Web.UI.StateBag.Item(System.String)" />
<altmember cref="M:System.Web.UI.StateBag.Add(System.String,System.Object)" />
</Docs>
</Member>
<Member MemberName="SetDirty">
<MemberSignature Language="C#" Value="public void SetDirty (bool dirty);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void SetDirty(bool dirty) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.StateBag.SetDirty(System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Sub SetDirty (dirty As Boolean)" />
<MemberSignature Language="F#" Value="member this.SetDirty : bool -> unit" Usage="stateBag.SetDirty dirty" />
<MemberSignature Language="C++ CLI" Value="public:
 void SetDirty(bool dirty);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dirty" Type="System.Boolean" Index="0" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1" />
</Parameters>
<Docs>
<param name="dirty">
<see langword="true" /> to mark the state of the collection and its items as modified; otherwise, <see langword="false" />.</param>
<summary>Sets the state of the <see cref="T:System.Web.UI.StateBag" /> object as well as the <see cref="P:System.Web.SessionState.ISessionStateItemCollection.Dirty" /> property of each of the <see cref="T:System.Web.UI.StateItem" /> objects contained by it.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.StateBag.SetDirty%2A> method is used to force the collection and its contents to be serialized during a call to the <xref:System.Web.UI.StateBag.System%23Web%23UI%23IStateManager%23SaveViewState%2A> method.
]]></format>
</remarks>
<altmember cref="M:System.Web.UI.StateBag.SetItemDirty(System.String,System.Boolean)" />
</Docs>
</Member>
<Member MemberName="SetItemDirty">
<MemberSignature Language="C#" Value="public void SetItemDirty (string key, bool dirty);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void SetItemDirty(string key, bool dirty) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.StateBag.SetItemDirty(System.String,System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Sub SetItemDirty (key As String, dirty As Boolean)" />
<MemberSignature Language="F#" Value="member this.SetItemDirty : string * bool -> unit" Usage="stateBag.SetItemDirty (key, dirty)" />
<MemberSignature Language="C++ CLI" Value="public:
 void SetItemDirty(System::String ^ key, bool dirty);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="key" Type="System.String" />
<Parameter Name="dirty" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="key">The key that identifies which <see cref="T:System.Web.UI.StateItem" /> in the <see cref="T:System.Web.UI.StateBag" /> to set.</param>
<param name="dirty">
<see langword="true" /> to mark the state of the item as modified; otherwise, <see langword="false" />.</param>
<summary>Sets the <see cref="P:System.Web.SessionState.ISessionStateItemCollection.Dirty" /> property for the specified <see cref="T:System.Web.UI.StateItem" /> object in the <see cref="T:System.Web.UI.StateBag" /> object.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.StateBag.SetItemDirty%2A> method is used to prevent or force state management of specific properties, represented by <xref:System.Web.UI.StateItem> objects in the <xref:System.Web.UI.StateBag> collection.
]]></format>
</remarks>
<altmember cref="M:System.Web.UI.StateBag.SetDirty(System.Boolean)" />
</Docs>
</Member>
<Member MemberName="System.Collections.ICollection.CopyTo">
<MemberSignature Language="C#" Value="void ICollection.CopyTo (Array array, int index);" />
<MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance void System.Collections.ICollection.CopyTo(class System.Array array, int32 index) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.StateBag.System#Collections#ICollection#CopyTo(System.Array,System.Int32)" />
<MemberSignature Language="VB.NET" Value="Sub CopyTo (array As Array, index As Integer) Implements ICollection.CopyTo" />
<MemberSignature Language="F#" Value="abstract member System.Collections.ICollection.CopyTo : Array * int -> unit
override this.System.Collections.ICollection.CopyTo : Array * int -> unit" Usage="stateBag.System.Collections.ICollection.CopyTo (array, index)" />
<MemberSignature Language="C++ CLI" Value=" virtual void System.Collections.ICollection.CopyTo(Array ^ array, int index) = System::Collections::ICollection::CopyTo;" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Collections.ICollection.CopyTo(System.Array,System.Int32)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="array" Type="System.Array" />
<Parameter Name="index" Type="System.Int32" />
</Parameters>
<Docs>
<param name="array">The one-dimensional <see cref="T:System.Array" /> that is the destination of the elements copied from <see cref="T:System.Collections.ICollection" />. The <see cref="T:System.Array" /> must have zero-based indexing.</param>
<param name="index">The zero-based index in <paramref name="array" /> at which copying begins.</param>
<summary>For a description of this member, see <see cref="M:System.Collections.ICollection.CopyTo(System.Array,System.Int32)" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This member is an explicit interface member implementation. It can be used only when the <xref:System.Web.UI.StateBag> instance is cast to an <xref:System.Collections.ICollection> interface.
]]></format>
</remarks>
<altmember cref="T:System.Collections.ICollection" />
</Docs>
</Member>
<Member MemberName="System.Collections.ICollection.IsSynchronized">
<MemberSignature Language="C#" Value="bool System.Collections.ICollection.IsSynchronized { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool System.Collections.ICollection.IsSynchronized" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.StateBag.System#Collections#ICollection#IsSynchronized" />
<MemberSignature Language="VB.NET" Value=" ReadOnly Property IsSynchronized As Boolean Implements ICollection.IsSynchronized" />
<MemberSignature Language="F#" Value="member this.System.Collections.ICollection.IsSynchronized : bool" Usage="System.Collections.ICollection.IsSynchronized" />
<MemberSignature Language="C++ CLI" Value="property bool System::Collections::ICollection::IsSynchronized { bool get(); };" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.Collections.ICollection.IsSynchronized</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>For a description of this member, see <see cref="P:System.Collections.ICollection.IsSynchronized" />.</summary>
<value>
<see langword="true" /> if access to the <see cref="T:System.Collections.ICollection" /> is synchronized (thread safe); otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This member is an explicit interface member implementation. It can be used only when the <xref:System.Web.UI.StateBag> instance is cast to an <xref:System.Collections.ICollection> interface.
]]></format>
</remarks>
<altmember cref="T:System.Collections.ICollection" />
</Docs>
</Member>
<Member MemberName="System.Collections.ICollection.SyncRoot">
<MemberSignature Language="C#" Value="object System.Collections.ICollection.SyncRoot { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance object System.Collections.ICollection.SyncRoot" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.StateBag.System#Collections#ICollection#SyncRoot" />
<MemberSignature Language="VB.NET" Value=" ReadOnly Property SyncRoot As Object Implements ICollection.SyncRoot" />
<MemberSignature Language="F#" Value="member this.System.Collections.ICollection.SyncRoot : obj" Usage="System.Collections.ICollection.SyncRoot" />
<MemberSignature Language="C++ CLI" Value="property System::Object ^ System::Collections::ICollection::SyncRoot { System::Object ^ get(); };" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.Collections.ICollection.SyncRoot</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Docs>
<summary>For a description of this member, see <see cref="P:System.Collections.ICollection.SyncRoot" />.</summary>
<value>An object that can be used to synchronize access to the <see cref="T:System.Collections.ICollection" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This member is an explicit interface member implementation. It can be used only when the <xref:System.Web.UI.StateBag> instance is cast to an <xref:System.Collections.ICollection> interface.
]]></format>
</remarks>
<altmember cref="T:System.Collections.ICollection" />
</Docs>
</Member>
<Member MemberName="System.Collections.IDictionary.Add">
<MemberSignature Language="C#" Value="void IDictionary.Add (object key, object value);" />
<MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance void System.Collections.IDictionary.Add(object key, object value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.StateBag.System#Collections#IDictionary#Add(System.Object,System.Object)" />
<MemberSignature Language="VB.NET" Value="Sub Add (key As Object, value As Object) Implements IDictionary.Add" />
<MemberSignature Language="F#" Value="abstract member System.Collections.IDictionary.Add : obj * obj -> unit
override this.System.Collections.IDictionary.Add : obj * obj -> unit" Usage="stateBag.System.Collections.IDictionary.Add (key, value)" />
<MemberSignature Language="C++ CLI" Value=" virtual void System.Collections.IDictionary.Add(System::Object ^ key, System::Object ^ value) = System::Collections::IDictionary::Add;" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Collections.IDictionary.Add(System.Object,System.Object)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="key" Type="System.Object" />
<Parameter Name="value" Type="System.Object" />
</Parameters>
<Docs>
<param name="key">The <see cref="T:System.Object" /> to use as the key of the element to add.</param>
<param name="value">The <see cref="T:System.Object" /> to use as the value of the element to add.</param>
<summary>For a description of this member, see <see cref="M:System.Collections.IDictionary.Add(System.Object,System.Object)" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This member is an explicit interface member implementation. It can be used only when the <xref:System.Web.UI.StateBag> instance is cast to an <xref:System.Collections.IDictionary> interface.
]]></format>
</remarks>
<altmember cref="T:System.Collections.IDictionary" />
</Docs>
</Member>
<Member MemberName="System.Collections.IDictionary.Contains">
<MemberSignature Language="C#" Value="bool IDictionary.Contains (object key);" />
<MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance bool System.Collections.IDictionary.Contains(object key) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.StateBag.System#Collections#IDictionary#Contains(System.Object)" />
<MemberSignature Language="VB.NET" Value="Function Contains (key As Object) As Boolean Implements IDictionary.Contains" />
<MemberSignature Language="F#" Value="abstract member System.Collections.IDictionary.Contains : obj -> bool
override this.System.Collections.IDictionary.Contains : obj -> bool" Usage="stateBag.System.Collections.IDictionary.Contains key" />
<MemberSignature Language="C++ CLI" Value=" virtual bool System.Collections.IDictionary.Contains(System::Object ^ key) = System::Collections::IDictionary::Contains;" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Collections.IDictionary.Contains(System.Object)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="key" Type="System.Object" />
</Parameters>
<Docs>
<param name="key">The key to locate in the <see cref="T:System.Collections.IDictionary" /> object.</param>
<summary>For a description of this member, see <see cref="M:System.Collections.IDictionary.Contains(System.Object)" />.</summary>
<returns>
<see langword="true" /> if the <see cref="T:System.Collections.IDictionary" /> contains an element with the key; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This member is an explicit interface member implementation. It can be used only when the <xref:System.Web.UI.StateBag> instance is cast to an <xref:System.Collections.IDictionary> interface.
]]></format>
</remarks>
<altmember cref="T:System.Collections.IDictionary" />
</Docs>
</Member>
<Member MemberName="System.Collections.IDictionary.IsFixedSize">
<MemberSignature Language="C#" Value="bool System.Collections.IDictionary.IsFixedSize { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool System.Collections.IDictionary.IsFixedSize" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.StateBag.System#Collections#IDictionary#IsFixedSize" />
<MemberSignature Language="VB.NET" Value=" ReadOnly Property IsFixedSize As Boolean Implements IDictionary.IsFixedSize" />
<MemberSignature Language="F#" Value="member this.System.Collections.IDictionary.IsFixedSize : bool" Usage="System.Collections.IDictionary.IsFixedSize" />
<MemberSignature Language="C++ CLI" Value="property bool System::Collections::IDictionary::IsFixedSize { bool get(); };" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.Collections.IDictionary.IsFixedSize</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>For a description of this member, see <see cref="P:System.Collections.IDictionary.IsFixedSize" />.</summary>
<value>
<see langword="true" /> if the <see cref="T:System.Collections.IDictionary" /> object has a fixed size; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This member is an explicit interface member implementation. It can be used only when the <xref:System.Web.UI.StateBag> instance is cast to an <xref:System.Collections.IDictionary> interface.
]]></format>
</remarks>
<altmember cref="T:System.Collections.IDictionary" />
</Docs>
</Member>
<Member MemberName="System.Collections.IDictionary.IsReadOnly">
<MemberSignature Language="C#" Value="bool System.Collections.IDictionary.IsReadOnly { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool System.Collections.IDictionary.IsReadOnly" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.StateBag.System#Collections#IDictionary#IsReadOnly" />
<MemberSignature Language="VB.NET" Value=" ReadOnly Property IsReadOnly As Boolean Implements IDictionary.IsReadOnly" />
<MemberSignature Language="F#" Value="member this.System.Collections.IDictionary.IsReadOnly : bool" Usage="System.Collections.IDictionary.IsReadOnly" />
<MemberSignature Language="C++ CLI" Value="property bool System::Collections::IDictionary::IsReadOnly { bool get(); };" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.Collections.IDictionary.IsReadOnly</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>For a description of this member, see <see cref="P:System.Collections.IDictionary.IsReadOnly" />.</summary>
<value>
<see langword="true" /> if the <see cref="T:System.Collections.IDictionary" /> object is read-only; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This member is an explicit interface member implementation. It can be used only when the <xref:System.Web.UI.StateBag> instance is cast to an <xref:System.Collections.IDictionary> interface.
]]></format>
</remarks>
<altmember cref="T:System.Collections.IDictionary" />
</Docs>
</Member>
<Member MemberName="System.Collections.IDictionary.Item">
<MemberSignature Language="C#" Value="object System.Collections.IDictionary.Item[object key] { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance object System.Collections.IDictionary.Item(object)" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.StateBag.System#Collections#IDictionary#Item(System.Object)" />
<MemberSignature Language="VB.NET" Value=" Property Item(key As Object) As Object Implements IDictionary.Item" />
<MemberSignature Language="F#" Value="member this.System.Collections.IDictionary.Item(obj) : obj with get, set" Usage="System.Collections.IDictionary.Item" />
<MemberSignature Language="C++ CLI" Value="property System::Object ^ System::Collections::IDictionary::Item[System::Object ^] { System::Object ^ get(System::Object ^ key); void set(System::Object ^ key, System::Object ^ value); };" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.Collections.IDictionary.Item(System.Object)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="key" Type="System.Object" Index="0" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1" />
</Parameters>
<Docs>
<param name="key">The key of the element to get.</param>
<summary>For a description of this member, see <see cref="P:System.Collections.IDictionary.Item(System.Object)" />.</summary>
<value>The element with the specified <paramref name="key" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This member is an explicit interface member implementation. It can be used only when the <xref:System.Web.UI.StateBag> instance is cast to an <xref:System.Collections.IDictionary> interface.
]]></format>
</remarks>
<altmember cref="T:System.Collections.IDictionary" />
</Docs>
</Member>
<Member MemberName="System.Collections.IDictionary.Remove">
<MemberSignature Language="C#" Value="void IDictionary.Remove (object key);" />
<MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance void System.Collections.IDictionary.Remove(object key) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.StateBag.System#Collections#IDictionary#Remove(System.Object)" />
<MemberSignature Language="VB.NET" Value="Sub Remove (key As Object) Implements IDictionary.Remove" />
<MemberSignature Language="F#" Value="abstract member System.Collections.IDictionary.Remove : obj -> unit
override this.System.Collections.IDictionary.Remove : obj -> unit" Usage="stateBag.System.Collections.IDictionary.Remove key" />
<MemberSignature Language="C++ CLI" Value=" virtual void System.Collections.IDictionary.Remove(System::Object ^ key) = System::Collections::IDictionary::Remove;" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Collections.IDictionary.Remove(System.Object)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="key" Type="System.Object" />
</Parameters>
<Docs>
<param name="key">The key of the element to remove.</param>
<summary>For a description of this member, see <see cref="M:System.Collections.IDictionary.Remove(System.Object)" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This member is an explicit interface member implementation. It can be used only when the <xref:System.Web.UI.StateBag> instance is cast to an <xref:System.Collections.IDictionary> interface.
]]></format>
</remarks>
<altmember cref="T:System.Collections.IDictionary" />
</Docs>
</Member>
<Member MemberName="System.Collections.IEnumerable.GetEnumerator">
<MemberSignature Language="C#" Value="System.Collections.IEnumerator IEnumerable.GetEnumerator ();" />
<MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance class System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.StateBag.System#Collections#IEnumerable#GetEnumerator" />
<MemberSignature Language="VB.NET" Value="Function GetEnumerator () As IEnumerator Implements IEnumerable.GetEnumerator" />
<MemberSignature Language="F#" Value="abstract member System.Collections.IEnumerable.GetEnumerator : unit -> System.Collections.IEnumerator
override this.System.Collections.IEnumerable.GetEnumerator : unit -> System.Collections.IEnumerator" Usage="stateBag.System.Collections.IEnumerable.GetEnumerator " />
<MemberSignature Language="C++ CLI" Value=" virtual System::Collections::IEnumerator ^ System.Collections.IEnumerable.GetEnumerator() = System::Collections::IEnumerable::GetEnumerator;" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Collections.IEnumerable.GetEnumerator</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.IEnumerator</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>For a description of this member, see <see cref="M:System.Collections.IEnumerable.GetEnumerator" />.</summary>
<returns>An <see cref="T:System.Collections.IEnumerator" /> that can be used to iterate through the collection.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This member is an explicit interface member implementation. It can be used only when the <xref:System.Web.UI.StateBag> instance is cast to an <xref:System.Collections.IEnumerable> interface.
]]></format>
</remarks>
<altmember cref="T:System.Collections.IEnumerable" />
</Docs>
</Member>
<Member MemberName="System.Web.UI.IStateManager.IsTrackingViewState">
<MemberSignature Language="C#" Value="bool System.Web.UI.IStateManager.IsTrackingViewState { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool System.Web.UI.IStateManager.IsTrackingViewState" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.StateBag.System#Web#UI#IStateManager#IsTrackingViewState" />
<MemberSignature Language="VB.NET" Value=" ReadOnly Property IsTrackingViewState As Boolean Implements IStateManager.IsTrackingViewState" />
<MemberSignature Language="F#" Value="member this.System.Web.UI.IStateManager.IsTrackingViewState : bool" Usage="System.Web.UI.IStateManager.IsTrackingViewState" />
<MemberSignature Language="C++ CLI" Value="property bool System::Web::UI::IStateManager::IsTrackingViewState { bool get(); };" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.Web.UI.IStateManager.IsTrackingViewState</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value indicating whether state changes are being tracked.</summary>
<value>
<see langword="true" /> if the <see cref="T:System.Web.UI.StateBag" /> is marked to save changes to its state; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This member is an explicit interface member implementation. It can be used only when the <xref:System.Web.UI.StateBag> instance is cast to an <xref:System.Web.UI.IStateManager> interface.
]]></format>
</remarks>
<altmember cref="M:System.Web.UI.StateBag.System#Web#UI#IStateManager#LoadViewState(System.Object)" />
<altmember cref="M:System.Web.UI.StateBag.System#Web#UI#IStateManager#SaveViewState" />
<altmember cref="M:System.Web.UI.StateBag.System#Web#UI#IStateManager#TrackViewState" />
</Docs>
</Member>
<Member MemberName="System.Web.UI.IStateManager.LoadViewState">
<MemberSignature Language="C#" Value="void IStateManager.LoadViewState (object state);" />
<MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance void System.Web.UI.IStateManager.LoadViewState(object state) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.StateBag.System#Web#UI#IStateManager#LoadViewState(System.Object)" />
<MemberSignature Language="VB.NET" Value="Sub LoadViewState (state As Object) Implements IStateManager.LoadViewState" />
<MemberSignature Language="F#" Value="abstract member System.Web.UI.IStateManager.LoadViewState : obj -> unit
override this.System.Web.UI.IStateManager.LoadViewState : obj -> unit" Usage="stateBag.System.Web.UI.IStateManager.LoadViewState state" />
<MemberSignature Language="C++ CLI" Value=" virtual void System.Web.UI.IStateManager.LoadViewState(System::Object ^ state) = System::Web::UI::IStateManager::LoadViewState;" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Web.UI.IStateManager.LoadViewState(System.Object)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="state" Type="System.Object" />
</Parameters>
<Docs>
<param name="state">An object that represents the <see cref="T:System.Web.UI.StateBag" /> state to restore.</param>
<summary>Restores the previously saved view state of the <see cref="T:System.Web.UI.StateBag" /> object.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method restores view-state information for the <xref:System.Web.UI.StateBag> object from a previous page request that was saved by the <xref:System.Web.UI.StateBag.System%23Web%23UI%23IStateManager%23SaveViewState%2A> method.
This method is primarily used by control developers. You can override this method to control how a custom server control restores its view state. For more information, see [ASP.NET State Management Overview](https://learn.microsoft.com/previous-versions/aspnet/75x4ha6s(v=vs.100)).
]]></format>
</remarks>
<altmember cref="M:System.Web.UI.StateBag.System#Web#UI#IStateManager#LoadViewState(System.Object)" />
</Docs>
</Member>
<Member MemberName="System.Web.UI.IStateManager.SaveViewState">
<MemberSignature Language="C#" Value="object IStateManager.SaveViewState ();" />
<MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance object System.Web.UI.IStateManager.SaveViewState() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.StateBag.System#Web#UI#IStateManager#SaveViewState" />
<MemberSignature Language="VB.NET" Value="Function SaveViewState () As Object Implements IStateManager.SaveViewState" />
<MemberSignature Language="F#" Value="abstract member System.Web.UI.IStateManager.SaveViewState : unit -> obj
override this.System.Web.UI.IStateManager.SaveViewState : unit -> obj" Usage="stateBag.System.Web.UI.IStateManager.SaveViewState " />
<MemberSignature Language="C++ CLI" Value=" virtual System::Object ^ System.Web.UI.IStateManager.SaveViewState() = System::Web::UI::IStateManager::SaveViewState;" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Web.UI.IStateManager.SaveViewState</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">