Commit Graph
84 Commits
Author SHA1 Message Date
Zoltan Varga 032f313d5f [bcl] Remove NET_4_0 defines from class libs. 2015-01-13 16:06:31 -05:00
Marek Habersack 879970ea20 [asp.net] Fix for bug #685267. ClientScriptManager generates correct post-back event reference for cross-page post-backs. 2011-04-14 22:40:06 +02:00
Marek Habersack 218262b92a [asp.net] A micro-optimization to not call String.Format too much in a loop. 2010-11-09 01:39:49 +01:00
Marek Habersack 4e74254594 2010-07-23 Marek Habersack <[email protected]>
* ClientScriptManager.cs: 4.0 adds a class="aspNetHidden"
	attribute to the div element surrounding the hidden elements.
2010-07-23 18:40:02 +02:00
Marek Habersack 5e9719f57c Gotten rid of NET_2_0 ifdefs and 1.1 code from System.Web.UI
svn path=/trunk/mcs/; revision=149929
2010-01-20 21:21:01 +00:00
Marek Habersack 3d083fe3fe 2009-12-22 Marek Habersack <[email protected]>
* HtmlForm.cs: RenderChildren is slightly more efficient now.

2009-12-22  Marek Habersack  <[email protected]>

	* Page.cs: form javascript declaration block is rendered only if
	necessary. Fixes bug #566541

	* ClientScriptManager.cs: added internal property ScriptsPresent
	used to determine if it is necessary to render form javascript
	declaration block.
	Hidden fields block is output without indenting the controls and
	without rendering trailing empty line.
	Made Write{Begin,End}ScriptBlock slightly faster.

svn path=/trunk/mcs/; revision=148840
2009-12-22 12:24:19 +00:00
Marek Habersack 5c59801fff Performance improvements:
- made sure invariant culture is used with String.ToLower, String.ToUpper and String.Compare
- replaced all calls to CultureInfo.InvariantCulture with a reference to a static field System.Web.Util.Helpers.InvariantCulture

svn path=/trunk/mcs/; revision=143587
2009-10-07 00:10:03 +00:00
Marek Habersack e39f408251 2009-06-01 Marek Habersack <[email protected]>
* ClientScriptManager.cs: WriteHiddenFields doesn't add the id
	attribute to generated input element in the 1.1 profile. Fixes bug
	#508167. Patch from Hubert FONGARNAND
	<[email protected]>, thanks!

svn path=/trunk/mcs/; revision=135134
2009-06-01 18:22:04 +00:00
Marek Habersack ef9c9e51ce Do not abuse the 'private' keyword
svn path=/trunk/mcs/; revision=116539
2008-10-20 17:37:54 +00:00
Marek Habersack 81c4068d12 2008-10-17 Marek Habersack <[email protected]>
* ImageMap.cs: added the SupportsEventValidation attribute to the
	class.
	Validate the event in RaisePostBackEvent ().
	Register for event validation in Render ().

	* DropDownList.cs, ListBox.cs: validate the event in LoadPostData ().

	* TextBox.cs: validate the event in LoadPostData ().
	Register for event validation in AddAttributesToRender ().

	* HiddenField.cs: validate the event in RaisePostDataChangedEvent.
	Register for event validation in Render ().

	* RadioButton.cs: validate the event in LoadPostData ().
	Register for event validation in InternalAddAttributesToRender.

	* CheckBox.cs, RadioButtonList.cs: validate the event in
	RaisePostDataChangedEvent.

	* Menu.cs: added the SupportsEventValidation attribute to the
	class.
	Validate the event in RaisePostBackEvent ().
	Register for event validation in GetClientEvent ().

	* DetailsView.cs, GridView.cs: validate the event in
	RaisePostBackEvent ().
	Register for validation in GetCallbackScript () and in OnPreRender

	* Button.cs, Table.cs, BulletedList.cs, Calendar.cs, LinkButton.cs,
	ImageButton.cs, TreeView.cs: validate the event in RaisePostBackEvent ().

2008-10-17  Marek Habersack  <[email protected]>

	* Control.cs: added the ValidateEvent internal method, used by
	classes descending from Control to automatically trigger event
	validation.

	* Page.cs: removed the CheckForValidationSupport method. It moved
	to Control.cs
	RaisePostBackEvent no longer validates the events, this
	functionality has been moved to Control.ValidateEvent.

2008-10-17  Marek Habersack  <[email protected]>

	* HtmlInputHidden.cs: validate the event in LoadPostDataInternal.

	* HtmlInputButton.cs: validate the event in
	RaisePostBackEventInternal ().
	Register for event validation in RenderAttributes ()

	* HtmlTextArea.cs: validate the event in
	RaisePostBackDataChangedEvent ().

	* HtmlButton.cs: validate the event in RaisePostBackEvent ().
	Register for event validation in RenderAttributes ()

	* HtmlAnchor.cs: validate the event in RaisePostBackEvent ().
	Register for event validation in RenderAttributes ().

	* HtmlInputRadioButton.cs, HtmlSelect.cs: validate the event in
	LoadPostData.

	* HtmlInputText.cs, HtmlInputImage.cs, HtmlInputCheckBox.cs,
	HtmlInputPassword.cs: validate the event in
	RaisePostDataChangedEvent ().

2008-10-17  Marek Habersack  <[email protected]>

	* MenuAdapterTest.cs: work around event validation failure in the
	test environment.

2008-10-17  Marek Habersack  <[email protected]>

	* PageTest.cs: use a custom version of HtmlInputHidden control to
	work around the new event validation code which doesn't work in
	this instance.

svn path=/trunk/mcs/; revision=116231
2008-10-17 14:56:19 +00:00
Roei Erez 2d881514ab Bug in javacript code, using window instead of document for checking if the script is already defined.
svn path=/trunk/mcs/; revision=107818
2008-07-13 11:27:47 +00:00
Igor Zelmanovich dc5657a2a6 2008-01-13 Igor Zelmanovich <[email protected]>
* webform.js:
	make scripts compatible with MicrosoftAjaxLibrary.		


svn path=/trunk/mcs/; revision=92773
2008-01-13 09:38:32 +00:00
Igor Zelmanovich ec71de5bf5 2008-01-09 Igor Zelmanovich <[email protected]>
* Page.cs:
	* ClientScriptManager.cs:
	refactoring.		


svn path=/trunk/mcs/; revision=92511
2008-01-09 15:27:42 +00:00
Igor Zelmanovich d305e47234 2008-01-07 Igor Zelmanovich <[email protected]>
* ClientScriptManager.cs:
	* Control.jvm.cs:			
	* Page.cs:
	* Page.jvm.cs:
	for TARGET_J2EE ensure page life cycle is completed in CrossPagePostBack.
	
2007-01-07 Igor Zelmanovich <[email protected]>

	* Button.cs:
	* ImageButton.cs:
	* LinkButton.cs:
	for TARGET_J2EE used CreateActionUrl instead ResolveClientUrl
	in GetPostBackOptions.			

2007-01-07 Igor Zelmanovich  <[email protected]>

	* HtmlForm.cs: refactoring.


svn path=/trunk/mcs/; revision=92387
2008-01-07 13:38:38 +00:00
Igor Zelmanovich c7166273ee for TARGET_J2EE only:
implement integration with JSF.

svn path=/trunk/mcs/; revision=91823
2007-12-23 10:36:14 +00:00
Marek Habersack f3a507ea6f 2007-12-20 Marek Habersack <[email protected]>
* ClientScriptManager.cs: write hidden fields inside a div only in
	the 2.0 profile. Fixes bug #349991

svn path=/trunk/mcs/; revision=91691
2007-12-20 11:31:45 +00:00
Igor Zelmanovich a5952c8ef9 refactoring
svn path=/branches/mainsoft/JSF/mcs/; revision=91686
2007-12-20 10:26:04 +00:00
Igor Zelmanovich 4148401c29 2007-12-20 Igor Zelmanovich <[email protected]>
* Page.cs:
	* Control.cs:
	* ClientScriptManager.cs:		
	refactoring: removed Page.LifeCycle internal API, 
	used Control's stateMask flag instead. 


svn path=/trunk/mcs/; revision=91685
2007-12-20 10:11:28 +00:00
Konstantin Triger f240884f8d remove unneeded TARGET_J2EE
svn path=/branches/mainsoft/JSF/mcs/; revision=91236
2007-12-13 16:33:27 +00:00
Marek Habersack 3476c409c3 2007-12-13 Marek Habersack <[email protected]>
* ClientScriptManager.cs, MasterPageParser.cs, Control.cs,
	Page.cs: speed optimization - use String.Concat instead of
	String.Format in some cases.
2007-12-13  Marek Habersack  <[email protected]>

	* Menu.cs, TreeView.cs: optimize use of String.Format in
	OnPreRender.
	Speed optimization - use String.Concat instead of String.Format in
	some cases.

	* GridView.cs, DetailsView.cs: optimize use of String.Format in
	OnPreRender.

	* CheckBox.cs, AccessDataSource.cs, WebColorConverter.cs,
	WebControl.cs,TextBox.cs, DropDownList.cs, ValidationSummary.cs,
	ListBox.cs, Panel.cs, BaseValidator.cs, LinkButton.cs: speed
	optimization - use String.Concat instead of String.Format in some cases.
2007-12-13  Marek Habersack  <[email protected]>

	* HtmlForm.cs, HtmlButton.cs: speed optimization - use String.Concat
	instead of String.Format in some cases.
2007-12-13  Marek Habersack  <[email protected]>

	* AssemblyResourceLoader.cs: speed optimization - use String.Concat
	instead of String.Format in some cases.
2007-12-13  Marek Habersack  <[email protected]>

	* SessionId.cs: 
	speed optimization - use String.Concat
	instead of String.Format in some cases.
2007-12-13  Marek Habersack  <[email protected]>

	* SqlProfileProvider.cs, ProfileParser.cs: speed optimization -
	use String.Concat instead of String.Format in some cases.
2007-12-13  Marek Habersack  <[email protected]>

	* ApplicationManager.cs, ApplicationHost.cs,
	DefaultVirtualPathProvider.cs: speed optimization - use
	String.Concat instead of String.Format in some cases.

svn path=/trunk/mcs/; revision=91230
2007-12-13 13:50:10 +00:00
Igor Zelmanovich e1616dd47f fixed HttpContext.CurrentExecutionFilePath for Transfer/Execute
used JSF API for ResolveClientUrl and create action url.

svn path=/branches/mainsoft/JSF/mcs/; revision=90798
2007-12-06 10:08:04 +00:00
Igor Zelmanovich 5460b394ca ClientScriptManager implement IStateManager
to provide access to hidden fields.

svn path=/branches/mainsoft/JSF/mcs/; revision=90548
2007-12-03 15:05:05 +00:00
Igor Zelmanovich 5c6b9ea5e2 implement JSF life cycle on the page
added IHttpExtendedHandler interface

svn path=/branches/mainsoft/JSF/mcs/; revision=89931
2007-11-19 15:22:55 +00:00
Igor Zelmanovich 0526507069 2007-11-13 Igor Zelmanovich <[email protected]>
* ClientScriptManager.cs: 
	Ensure a script resource is included once in multi form environment.


svn path=/trunk/mcs/; revision=89561
2007-11-13 15:56:35 +00:00
Marek Habersack c6676331ce 2007-11-05 Marek Habersack <[email protected]>
* ClientScriptManager.cs: EventStateFieldName is a constant now.

	* Page.cs: use full control ids when processing post data. Fixes
	bug #317615

svn path=/trunk/mcs/; revision=88932
2007-11-05 22:35:03 +00:00
Marek Habersack 4887220bcd 2007-11-03 Marek Habersack <[email protected]>
* ClientScriptManager.cs: eventValidationArray is serialized in an
	optimized fashion, so that its serialized form occupies only as
	many slots as were actually used. It may result in that an array
	of 0 entries will be serialized and then
	restored. EnsureEventValidationArray takes that into consideration
	now.

svn path=/trunk/mcs/; revision=88759
2007-11-03 00:04:51 +00:00
Marek Habersack bcb6e84bcf 2007-10-23 Marek Habersack <[email protected]>
* ClientScriptManager.cs: added two constants to define start/end
	script block comments rendering. 1.1 uses HTML comments, while 2.0
	uses a CDATA block.

	* Page.cs: render script blocks with start/end comments taken from
	the ClientScriptManager constants above.

svn path=/trunk/mcs/; revision=87979
2007-10-23 12:39:45 +00:00
Igor Zelmanovich c9fb7da942 2007-08-23 Igor Zelmanovich <[email protected]>
* ClientScriptManager.cs: encode values of hidden fields. 


svn path=/trunk/mcs/; revision=84683
2007-08-23 09:22:21 +00:00
Igor Zelmanovich d816ca7ff2 2007-08-21 Igor Zelmanovich <[email protected]>
* ClientScriptManager.cs: fixed onsubmit script for MultiForm environment 


svn path=/trunk/mcs/; revision=84558
2007-08-21 15:29:24 +00:00
Vladimir Krasnov efee098711 * ClientScriptManager.cs: otimized string.Replace in GetScriptLiteral
svn path=/trunk/mcs/; revision=84075
2007-08-14 13:32:35 +00:00
Igor Zelmanovich 7bba17dd3c 2007-07-24 Igor Zelmanovich <[email protected]>
* webform.js:
	* WebUIValidation_2.0.js:
	refactoring: provide possibility to define relevant functions in different 
	scopes. (global=window or form element). thus providing a solution for 
	multi form environment.		

2007-07-24 Igor Zelmanovich <[email protected]>

	* ClientScriptManager.cs:
	* Page.cs:
	* Page.jvm.cs:
	added new internal property IsMultiForm which returns false under
	!TARGET_J2EE (Portal). All client scripts are rendered 
	according this property.	
		
2007-07-24 Igor Zelmanovich <[email protected]>

	* BaseValidator.cs: All client scripts are rendered 
	according IsMultiForm property.


svn path=/trunk/mcs/; revision=82648
2007-07-25 08:59:32 +00:00
Igor Zelmanovich 22862a356e 2007-07-24 Igor Zelmanovich <[email protected]>
* TreeView.cs: refactoring:
	* TreeView.js:
	used ClientScriptManager.GetCallbackEventReference API instead calling 
	WebForm_DoCallback explicit.
		
2007-07-24 Igor Zelmanovich <[email protected]>

	* ClientScriptManager.cs: fixed: GetCallbackEventReference method.
		

svn path=/trunk/mcs/; revision=82560
2007-07-24 12:19:00 +00:00
Igor Zelmanovich bb8edfd8e7 typo fix
svn path=/trunk/mcs/; revision=82432
2007-07-22 10:35:56 +00:00
Igor Zelmanovich 3b8200c20c 2007-07-18 Igor Zelmanovich <[email protected]>
* Page.cs:
	* ClientScriptManager.cs:
	scripts, registered using RegisterClientScriptInclude, 
	RegisterClientScriptResource and RegisterClientScriptBlock appear on Page
	in order matches the order in which the scripts were registered.

svn path=/trunk/mcs/; revision=82189
2007-07-18 11:03:17 +00:00
Vladimir Krasnov 651a65a740 * ClientScriptManager.cs: refactored event validation data structure
* Page.cs: fixed InternalProcessRequest, event validation list should be cleared before render

svn path=/trunk/mcs/; revision=81858
2007-07-12 09:26:28 +00:00
Marek Habersack f11f1edba1 2007-05-14 Marek Habersack <[email protected]>
* ClientScriptManager.cs: put the hidden field within a <div>, the
	way MS.NET does it.

svn path=/trunk/mcs/; revision=77330
2007-05-14 07:43:43 +00:00
Marek Habersack 2cdf3d39be 2007-04-06 Marek Habersack <[email protected]>
* ClientScriptManager.cs: render the 'type' attribute in
	WriteScript and do not render the 'language' attribute when in
	NET_2_0+ mode.

2007-04-06  Marek Habersack  <[email protected]>

	* HttpUtility.cs: added a constant that contains the default query
	parameter character.
	ParseQueryString supports queries with both '&' and ';' parameter
	separators.

2007-04-06  Marek Habersack  <[email protected]>

	* HtmlForm.cs: render the 'name' attribute only when in non-xhtml
	compliant mode.

2007-04-06  Marek Habersack  <[email protected]>

	* AssemblyResourceLoader.cs: use the correct query parameter
	separator char for the current platform version. Fixes bug
	#80633.

svn path=/trunk/mcs/; revision=75480
2007-04-06 11:51:51 +00:00
Konstantin Triger 5cff7fd740 use Invariant culture for string manipulations
svn path=/trunk/mcs/; revision=75433
2007-04-05 12:48:48 +00:00
Konstantin Triger c1360afb03 use Invariant culture for string manipulations
svn path=/trunk/mcs/; revision=75429
2007-04-05 11:43:27 +00:00
Konstantin Triger c6a17bec7f use Invariant culture for string manipulations
svn path=/trunk/mcs/; revision=75426
2007-04-05 11:28:59 +00:00
Igor Zelmanovich 4a0f6713a1 2007-02-26 Igor Zelmanovich <[email protected]>
* ClientScriptManager.cs: fixed: GetScriptLiteral escapes back-slash:

svn path=/trunk/mcs/; revision=73419
2007-02-26 10:21:12 +00:00
Igor Zelmanovich 6631487c2c 2007-02-19 Igor Zelmanovich <[email protected]>
* ClientScriptManager.cs:
	* Control.cs:			 
	* Page.cs:
	implemented PostBackOptions.TrackFocus feature.	

svn path=/trunk/mcs/; revision=73123
2007-02-19 17:38:05 +00:00
Eyal Alalouf 9396a91227 add Http callback support for J2EE portlets.
svn path=/trunk/mcs/; revision=73071
2007-02-18 12:28:38 +00:00
Igor Zelmanovich 93c2a62294 2007-02-14 Igor Zelmanovich <[email protected]>
* Page.cs: for 2.0: '__doPostBack' declared as function of form.
	convention to use 'currForm' instead 'myForm'	

svn path=/trunk/mcs/; revision=72842
2007-02-14 15:37:00 +00:00
Igor Zelmanovich b9f726a2a4 2007-02-14 Igor Zelmanovich <[email protected]>
* Page.cs:
	* ClientScriptManager.cs:
	including 'webform.js' requires '__doPostBack' on the form be rendered.  

svn path=/trunk/mcs/; revision=72832
2007-02-14 14:14:39 +00:00
Igor Zelmanovich 1e9ca637a8 2007-02-14 Igor Zelmanovich <[email protected]>
* Page.cs:
	* ClientScriptManager.cs:
	refactoring: 'theForm' variable is always declared on client. 
	'__EVENTTARGET' and '__EVENTARGUMENT' hidden fields is rendered using 
	RegisterHiddenField API. 'WebForm_OnSubmit' declared as function of form. 	

svn path=/trunk/mcs/; revision=72830
2007-02-14 13:53:09 +00:00
Igor Zelmanovich e663791ec8 typo fix
svn path=/trunk/mcs/; revision=72814
2007-02-14 09:24:28 +00:00
Igor Zelmanovich 4ec09efa0f 2007-02-14 Igor Zelmanovich <[email protected]>
* Page.cs:
	* ClientScriptManager.cs:
	implemented RegisterOnSubmitStatement for 2.0	

svn path=/trunk/mcs/; revision=72810
2007-02-14 07:50:51 +00:00
Igor Zelmanovich 35e4dec3b5 2007-02-13 Igor Zelmanovich <[email protected]>
* ClientScriptManager.cs: EventValidation feature optimization on Callback.


svn path=/trunk/mcs/; revision=72779
2007-02-13 14:58:32 +00:00
Vladimir Krasnov ffc117e499 * webform.js: added validators context init for j2ee portal support
* WebUIValidation_2.0.js: added SetValidatorContext function, refactored evaluation function init ValidatorOnLoad and Page_ClientValidate
* ClientScriptManager.cs: added array declaration also as member of form in TARGET_J2EE for j2ee portal support. 
Added validators context init for GetClientValidationEvent under TARGET_J2EE for j2ee portal support.
* Page.cs: fixed OnFormPostRender, render array declarations after postback script.

svn path=/trunk/mcs/; revision=72465
2007-02-08 10:29:55 +00:00