2 // System.Web.UI.PostBackOptions.cs
5 // Sanjay Gupta (gsanjay@novell.com)
7 // Copyright (C) 2004 Novell, Inc (http://www.novell.com)
10 // Permission is hereby granted, free of charge, to any person obtaining
11 // a copy of this software and associated documentation files (the
12 // "Software"), to deal in the Software without restriction, including
13 // without limitation the rights to use, copy, modify, merge, publish,
14 // distribute, sublicense, and/or sell copies of the Software, and to
15 // permit persons to whom the Software is furnished to do so, subject to
16 // the following conditions:
18 // The above copyright notice and this permission notice shall be
19 // included in all copies or substantial portions of the Software.
21 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
25 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
27 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
33 namespace System.Web.UI
35 public sealed class PostBackOptions
37 private Control control;
38 private string argument;
39 private string actionUrl;
40 private bool autoPostBack;
41 private bool requiresJavaScriptProtocol;
42 private bool trackFocus;
43 private bool clientSubmit;
44 private bool performValidation;
45 private string validationGroup;
47 public PostBackOptions (Control control) : this (control, string.Empty, string.Empty, false, false, false,
48 false, false, string.Empty)
52 public PostBackOptions (Control control, string argument) : this (control, argument, string.Empty, false,
53 false, false, false, false, string.Empty)
57 public PostBackOptions (Control control, string argument, string actionUrl, bool isAutoPostBack,
58 bool isJavaScriptProtocolRequired, bool isTrackFocus, bool isClientSubmit,
59 bool isValidationPerformed, string validatingGroup)
61 this.control = control;
62 this.argument = argument;
63 this.actionUrl = actionUrl;
64 this.autoPostBack = isAutoPostBack;
65 this.requiresJavaScriptProtocol = isJavaScriptProtocolRequired;
66 this.trackFocus = isTrackFocus;
67 this.clientSubmit = isClientSubmit;
68 this.performValidation = isValidationPerformed;
69 this.validationGroup = validatingGroup;
72 public string ActionUrl {
73 get { return actionUrl; }
74 set { actionUrl = value; }
77 public string Argument {
78 get { return argument; }
79 set { argument = value; }
82 public bool AutoPostBack {
83 get { return autoPostBack; }
84 set { autoPostBack = value; }
87 public bool ClientSubmit {
88 get { return clientSubmit; }
89 set { clientSubmit = value; }
92 public bool PerformValidation {
93 get { return performValidation; }
94 set { performValidation = value; }
97 public bool RequiresJavaScriptProtocol {
98 get { return requiresJavaScriptProtocol; }
99 set { requiresJavaScriptProtocol = value; }
102 public Control TargetControl {
103 get { return control; }
104 set { control = value; }
107 public bool TrackFocus {
108 get { return trackFocus; }
109 set { trackFocus = value; }
112 public string ValidationGroup {
113 get { return validationGroup; }
114 set { validationGroup = value; }