Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / MIT / System / Web / UI / MobileControls / Adapters / ChtmlTextBoxAdapter.cs / 1305376 / ChtmlTextBoxAdapter.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System.Security.Permissions; #if COMPILING_FOR_SHIPPED_SOURCE namespace System.Web.UI.MobileControls.ShippedAdapterSource #else namespace System.Web.UI.MobileControls.Adapters #endif { /* * ChtmlTextBoxAdapter class. * * Copyright (c) 2000 Microsoft Corporation */ ///[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)] [Obsolete("The System.Web.Mobile.dll assembly has been deprecated and should no longer be used. For information about how to develop ASP.NET mobile applications, see http://go.microsoft.com/fwlink/?LinkId=157231.")] public class ChtmlTextBoxAdapter : HtmlTextBoxAdapter { private static Random _random = new Random(); /// protected override void AddAttributes(HtmlMobileTextWriter writer) { if (Control.Numeric) { if (Device.SupportsInputIStyle) { // The default input mode is always numeric if the // type is password. if (!Control.Password) { writer.WriteAttribute("istyle", "4"); } } else if (Device.SupportsInputMode) { writer.WriteAttribute("mode", "numeric"); } } AddAccesskeyAttribute(writer); AddJPhoneMultiMediaAttributes(writer); } /// public override bool RequiresFormTag { get { return true; } } private String GetRandomID(int length) { Byte[] randomBytes = new Byte[length]; _random.NextBytes(randomBytes); char[] randomChars = new char[length]; for (int i = 0; i < length; i++) { randomChars[i] = (char)((((int)randomBytes[i]) % 26) + 'a'); } return new String(randomChars); } internal override String GetRenderName() { String renderName = base.GetRenderName(); if (Device.RequiresUniqueHtmlInputNames) { renderName += Constants.SelectionListSpecialCharacter + GetRandomID(4); } return renderName; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Enlistment.cs
- DataGridViewTopLeftHeaderCell.cs
- Label.cs
- DateTimeConverter.cs
- ListViewGroupItemCollection.cs
- ConsumerConnectionPoint.cs
- ProcessHost.cs
- baseshape.cs
- CodeDesigner.cs
- HasCopySemanticsAttribute.cs
- PageVisual.cs
- ResourceBinder.cs
- LinkArea.cs
- InvokeDelegate.cs
- XmlLanguage.cs
- figurelengthconverter.cs
- DbgCompiler.cs
- HotSpotCollectionEditor.cs
- SHA256Managed.cs
- IndexingContentUnit.cs
- AssemblySettingAttributes.cs
- ExceptionNotification.cs
- FixUpCollection.cs
- compensatingcollection.cs
- WebPartUtil.cs
- ChameleonKey.cs
- RoleService.cs
- DataControlLinkButton.cs
- File.cs
- XmlQualifiedName.cs
- XmlArrayItemAttribute.cs
- Trace.cs
- CodeGotoStatement.cs
- LogExtentCollection.cs
- ReceiveCompletedEventArgs.cs
- ModifierKeysConverter.cs
- XmlQueryCardinality.cs
- ItemsChangedEventArgs.cs
- DataTrigger.cs
- OrderedDictionaryStateHelper.cs
- DbExpressionRules.cs
- OleDbInfoMessageEvent.cs
- LocationEnvironment.cs
- ProtocolImporter.cs
- SafeLibraryHandle.cs
- HttpPostedFile.cs
- ServiceDescriptionSerializer.cs
- DesignTimeSiteMapProvider.cs
- PageClientProxyGenerator.cs
- ScriptResourceAttribute.cs
- VisualTreeHelper.cs
- WindowsComboBox.cs
- EncryptedPackage.cs
- SerializationStore.cs
- Track.cs
- DSACryptoServiceProvider.cs
- MachineKeySection.cs
- ThreadStaticAttribute.cs
- DeploymentExceptionMapper.cs
- CryptoKeySecurity.cs
- Selector.cs
- HatchBrush.cs
- webclient.cs
- XmlSchemaAnyAttribute.cs
- HierarchicalDataTemplate.cs
- X509Utils.cs
- WSSecureConversationDec2005.cs
- TCPListener.cs
- Light.cs
- FixedSOMPage.cs
- DataGridDetailsPresenter.cs
- VisualStyleTypesAndProperties.cs
- Triplet.cs
- TextFormatterContext.cs
- EntityProviderServices.cs
- MDIClient.cs
- IBuiltInEvidence.cs
- DiscoveryUtility.cs
- UrlMapping.cs
- TextServicesContext.cs
- IdentitySection.cs
- BindToObject.cs
- SoapReflectionImporter.cs
- X509CertificateCollection.cs
- DiscreteKeyFrames.cs
- BindingExpression.cs
- TabControl.cs
- UIElement.cs
- PropertyChangeTracker.cs
- IDictionary.cs
- FirstMatchCodeGroup.cs
- TickBar.cs
- LightweightCodeGenerator.cs
- GridItemCollection.cs
- Object.cs
- WindowsTreeView.cs
- StyleTypedPropertyAttribute.cs
- PackageRelationship.cs
- FixedSOMSemanticBox.cs
- BamlTreeUpdater.cs