2008-03-13 Marek Habersack <mhabersack@novell.com>
[mono.git] / mcs / class / System.Web / System.Web.UI / ClientScriptManager.jvm.cs
1 //\r
2 // (C) 2007 Mainsoft Corporation (http://www.mainsoft.com)\r
3 //\r
4 \r
5 //\r
6 // Permission is hereby granted, free of charge, to any person obtaining\r
7 // a copy of this software and associated documentation files (the\r
8 // "Software"), to deal in the Software without restriction, including\r
9 // without limitation the rights to use, copy, modify, merge, publish,\r
10 // distribute, sublicense, and/or sell copies of the Software, and to\r
11 // permit persons to whom the Software is furnished to do so, subject to\r
12 // the following conditions:\r
13 //\r
14 // The above copyright notice and this permission notice shall be\r
15 // included in all copies or substantial portions of the Software.\r
16 //\r
17 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
18 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
19 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
20 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r
21 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r
22 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
23 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
24 //\r
25 \r
26 using System;\r
27 using System.Collections.Generic;\r
28 using System.Text;\r
29 using System.Web.UI;\r
30 using System.Collections.Specialized;\r
31 using System.Collections;\r
32 \r
33 namespace System.Web.UI\r
34 {\r
35         partial class ClientScriptManager : IStateManager\r
36         {\r
37                 #region IStateManager Members\r
38 \r
39                 void IStateManager.LoadViewState (object state) {\r
40                         throw new NotSupportedException ();\r
41                 }\r
42 \r
43                 object IStateManager.SaveViewState () {\r
44                         if (hiddenFields != null) {\r
45                                 Hashtable clone = (Hashtable) hiddenFields.Clone ();\r
46                                 clone.Remove ("__VIEWSTATE");\r
47                                 clone.Remove (Page.postEventArgumentID);\r
48                                 clone.Remove (Page.postEventSourceID);\r
49                                 clone.Remove (Page.CallbackArgumentID);\r
50                                 clone.Remove (Page.CallbackSourceID);\r
51                                 if (clone.Keys.Count > 0)\r
52                                         return clone;\r
53                         }\r
54                         return null;\r
55                 }\r
56 \r
57                 void IStateManager.TrackViewState () {\r
58                         throw new NotSupportedException ();\r
59                 }\r
60 \r
61                 bool IStateManager.IsTrackingViewState {\r
62                         get { throw new NotSupportedException (); }\r
63                 }\r
64 \r
65                 #endregion\r
66         }\r
67 }\r