コード例 #1
0
 private void CheckHidden_Unchecked(object sender, RoutedEventArgs e)
 {
     PasswordField.Visibility = Visibility.Visible;
     PasswordHide.Visibility  = Visibility.Hidden;
     PasswordField.Password   = PasswordHide.Text;
     PasswordField.Focus();
 }
コード例 #2
0
ファイル: LoginPage.cs プロジェクト: wchipchase/JPAutomation
        public void Login(String username, String password)
        {
            bool isLoggedIn = false;

            while (!isLoggedIn)
            {
                if (!isLoggingIn)
                {
                    try
                    {
                        isLoggingIn = true;
                        Thread.Sleep(1000);
                        UsernameField.SendKeys(username);
                        PasswordField.SendKeys(password);
                        LoginButton.Click();

                        if (Driver.WebDriver.PageSource.Contains("CAS Authentication failed!"))
                        {
                            CasAuthFailRedirect.Click();
                        }
                        isLoggedIn = true;
                    } catch (Exception e)
                    {
                    } finally
                    {
                        isLoggingIn = false;
                    }
                }
                else
                {
                    Thread.Sleep(new Random().Next(1, 99) * 100);
                }
            }
        }
コード例 #3
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            // Perform any additional setup after loading the view, typically from a nib.

            PasswordField.AutocorrectionType = UITextAutocorrectionType.No;
            PasswordField.KeyboardType       = UIKeyboardType.Default;
            PasswordField.ReturnKeyType      = UIReturnKeyType.Done;
            PasswordField.ClearButtonMode    = UITextFieldViewMode.WhileEditing;

            PasswordField.ShouldReturn = delegate
            {
                PasswordField.ResignFirstResponder();
                return(true);
            };

            SelectGroupLabel.Hidden = true;
            PasswordLabel.Hidden    = true;
            PasswordField.Hidden    = true;
            SubmitButton.Hidden     = true;
            GroupPicker.Hidden      = true;
            GoBackButton.Hidden     = true;


            FadeAnimation(SelectGroupLabel, isIn: false, duration: 1, onFinished: null);
            FadeAnimation(PasswordLabel, isIn: false, duration: 1, onFinished: null);
            FadeAnimation(PasswordField, isIn: false, duration: 1, onFinished: null);
            FadeAnimation(SubmitButton, isIn: false, duration: 1, onFinished: null);
            FadeAnimation(GroupPicker, isIn: false, duration: 1, onFinished: null);
            FadeAnimation(GoBackButton, isIn: false, duration: 1, onFinished: null);
        }
        void ReleaseDesignerOutlets()
        {
            if (UsernameField != null)
            {
                UsernameField.Dispose();
                UsernameField = null;
            }

            if (PasswordField != null)
            {
                PasswordField.Dispose();
                PasswordField = null;
            }

            if (CancelButton != null)
            {
                CancelButton.Dispose();
                CancelButton = null;
            }

            if (LoginButton != null)
            {
                LoginButton.Dispose();
                LoginButton = null;
            }
        }
コード例 #5
0
ファイル: LoginPage.cs プロジェクト: MrPrzemek1/Jabbes-Panel
 public LoginPage FillLoginFormWithIncorrectDataAndSubmit(string login, string password)
 {
     LoginField.SendKeys(login);
     PasswordField.SendKeys(password);
     SubmitButton.Submit();
     return(new LoginPage());
 }
コード例 #6
0
ファイル: LoginPage.cs プロジェクト: daryaklimovaIDT/training
 public void LogIn(string login, string password)
 {
     LoginField.ClearAndSendText(login);
     EnterButton.ClickElement();
     WebDriverWaitUtil.WaitForElementToBeVisible(PasswordField);
     PasswordField.ClearAndSendText(password);
 }
コード例 #7
0
ファイル: HomePage.cs プロジェクト: maciekte/CesarCipher
 public DashboardPage LoginOnPage(string login, string password)
 {
     LoginField.SendKeys(login);
     PasswordField.SendKeys(password);
     SubmitButton.Click();
     return(new DashboardPage(Driver));
 }
コード例 #8
0
 private void ClearForm()
 {
     UserNameField.Clear();
     PasswordField.Clear();
     RetypePasswordField.Clear();
     EmailField.Clear();
 }
コード例 #9
0
 public void CheckInvalidLogin(string username, string password)
 {
     UsernameField.SendKeys(username);
     PasswordField.SendKeys(password);
     FailedBtnSignIn.Click(false);
     ErrorLoginMessage.WaitForElementVisibleAndEnabled();
 }
コード例 #10
0
 public MainPage InputPassword(string password)
 {
     PasswordField.Click();
     PasswordField.Clear();
     PasswordField.SendKeys(password);
     return(this);
 }
コード例 #11
0
ファイル: LoginForm.cs プロジェクト: betarium/PassPause
        private void EnterButton_Click(object sender, EventArgs e)
        {
            if (UserIdField.Text == "")
            {
                MessageBox.Show("ユーザー名を入力してください");
                UserIdField.Focus();
                return;
            }
            else if (PasswordField.Text == "")
            {
                MessageBox.Show("パスワードを入力してください");
                PasswordField.Focus();
                return;
            }

            AuthEventArgs e2 = new AuthEventArgs();

            e2.UserId   = UserIdField.Text;
            e2.Password = PasswordField.Text;
            Auth(e2);
            if (!e2.Success)
            {
                MessageBox.Show("ユーザー名またはパスワードに誤りがあります");
                UserIdField.Focus();
                return;
            }
            DialogResult = System.Windows.Forms.DialogResult.OK;
            Close();
        }
コード例 #12
0
        protected override void SetupLayoutConstraints()
        {
            base.SetupLayoutConstraints();

            this.SubviewsDoNotTranslateAutoresizingMaskIntoConstraints();

            this.AddConstraints(
                BackgroundImage.FullSizeOf(this));

            this.AddConstraints(
                LoginField.AtTopOf(this, 220),
                LoginField.AtLeadingOf(this, 50),
                LoginField.AtTrailingOf(this, 50),
                LoginField.Height().EqualTo(Theme.Dimensions.TextFieldHeight),

                PasswordField.Below(LoginField, 12),
                PasswordField.WithSameLeading(LoginField),
                PasswordField.WithSameWidth(LoginField),
                PasswordField.WithSameHeight(LoginField),

                SignInButton.Below(PasswordField, 16),
                SignInButton.WithSameCenterX(this),
                SignInButton.Width().EqualTo(218),
                SignInButton.Height().EqualTo(44),

                ErrorMessageView.Above(LoginField, 36),
                ErrorMessageView.WithSameLeading(LoginField),
                ErrorMessageView.WithSameWidth(LoginField),

                ErrorMessageTriangleImage.Below(ErrorMessageView),
                ErrorMessageTriangleImage.WithSameCenterX(this));
        }
コード例 #13
0
 private void FillCredentials(Credentials credentials)
 {
     FullNameField.Clear();
     FullNameField.SendKeys(credentials.FullName);
     PasswordField.Clear();
     PasswordField.SendKeys(credentials.Password);
 }
コード例 #14
0
        void ReleaseDesignerOutlets()
        {
            if (AddButton != null)
            {
                AddButton.Dispose();
                AddButton = null;
            }

            if (CancelButton != null)
            {
                CancelButton.Dispose();
                CancelButton = null;
            }

            if (UserNameField != null)
            {
                UserNameField.Dispose();
                UserNameField = null;
            }

            if (PasswordField != null)
            {
                PasswordField.Dispose();
                PasswordField = null;
            }

            if (ValidationLabel != null)
            {
                ValidationLabel.Dispose();
                ValidationLabel = null;
            }
        }
コード例 #15
0
        void ReleaseDesignerOutlets()
        {
            if (LoginButton != null)
            {
                LoginButton.Dispose();
                LoginButton = null;
            }

            if (PasswordField != null)
            {
                PasswordField.Dispose();
                PasswordField = null;
            }

            if (TryAgainLabel != null)
            {
                TryAgainLabel.Dispose();
                TryAgainLabel = null;
            }

            if (UsernameField != null)
            {
                UsernameField.Dispose();
                UsernameField = null;
            }
        }
コード例 #16
0
 public void LogInUser(string username, string password)
 {
     UserNameField.SendKeys(username);
     PasswordField.SendKeys(password);
     RememberMeCheckBox.Click();
     LogIn.Submit();
 }
コード例 #17
0
        public override void ViewDidLoad()
        {
            _didShowNotificationObserver = NSNotificationCenter.DefaultCenter.AddObserver(UIKeyboard.DidShowNotification, KeyBoardDidShow, this);

            _willHideNotificationObserver = NSNotificationCenter.DefaultCenter.AddObserver(UIKeyboard.WillHideNotification, KeyBoardWillHide, this);

            ActivityIndicator.StopAnimating();

            this.LoginField.ShouldReturn       += (textField) => textField.ResignFirstResponder();
            this.PasswordField.ShouldReturn    += (textField) => textField.ResignFirstResponder();
            this.AdressField.ShouldReturn      += (textField) => textField.ResignFirstResponder();
            this.PhoneNumberField.ShouldReturn += (textField) => textField.ResignFirstResponder();

            this.View.AddGestureRecognizer(new UITapGestureRecognizer(() =>
            {
                LoginField.ResignFirstResponder();
                PasswordField.ResignFirstResponder();
                AdressField.ResignFirstResponder();
                PhoneNumberField.ResignFirstResponder();
            }));

            RegistrationButton.TouchUpInside += async(sender, e) =>
            {
                Customers registrationFieldsForAsync = new Customers()
                {
                    Name = LoginField.Text, Password = PasswordField.Text, Adress = AdressField.Text, PhoneNumber = PhoneNumberField.Text
                };
                ActivityIndicator.StartAnimating();
                try
                {
                    RegistrationButton.Enabled = false;
                    LoginAndPasswordCheck.LoginCheck(registrationFieldsForAsync.Name);
                    LoginAndPasswordCheck.PasswordCheck(registrationFieldsForAsync.Password);
                    LoginAndPasswordCheck.AdressCheck(registrationFieldsForAsync.Adress);
                    LoginAndPasswordCheck.PhoneCheck(registrationFieldsForAsync.PhoneNumber);
                    await UsersCheckClass.TryToRegister(registrationFieldsForAsync);

                    AppDelegate.UserName = registrationFieldsForAsync.Name;
                    PerformSegue("RegistrationSegue", null);
                }
                catch (FiledsCheckException e1)
                {
                    ActivityIndicator.StopAnimating();
                    RegistrationButton.Enabled = true;
                    PresentViewController(GetAlertsClass.GetAlert(e1.Message), true, null);
                }
                catch (UserCheckClassException e1)
                {
                    ActivityIndicator.StopAnimating();
                    RegistrationButton.Enabled = true;
                    PresentViewController(GetAlertsClass.GetAlert(e1.Message), true, null);
                }
                catch
                {
                    ActivityIndicator.StopAnimating();
                    RegistrationButton.Enabled = true;
                    PresentViewController(GetAlertsClass.GetAlert("Не удалось подключиться к серверу"), true, null);
                }
            };
        }
コード例 #18
0
            public void Register(string planType)
            {
                var d = new Data.AccountInfo();


                EmailField.SendKeys(planType + d.Email);
                EmailConfirmField.SendKeys(planType + d.Email);
                UsernameField.SendKeys(planType + d.username);
                PasswordField.SendKeys(d.Password);
                ConfirmPasswordField.SendKeys(d.Password);
                SelectElement SecurityQuestionDrop = new SelectElement(SecurityQuestionDropdown);

                SecurityQuestionDrop.SelectByText(d.Securityselection);
                SecurityQuestionAnswer.SendKeys(d.Securityanswer);
                NextButton.Click();

                if (this._driver.Url == @"https://betacustomeraccess.myfloridaprepaid.com/enrollment/accountowner.aspx")
                {
                    Tests.successCount++;
                    Console.WriteLine("User: "******" created]");
                }
                else
                {
                    Tests.failCount++;
                    Console.WriteLine("[FAIL] [RUN #" + Tests.runCount + "]" + "[User: "******" not created]");
                }
            }
コード例 #19
0
        void ReleaseDesignerOutlets()
        {
            if (ActivityIndicator != null)
            {
                ActivityIndicator.Dispose();
                ActivityIndicator = null;
            }

            if (LogInButton != null)
            {
                LogInButton.Dispose();
                LogInButton = null;
            }

            if (LoginField != null)
            {
                LoginField.Dispose();
                LoginField = null;
            }

            if (PasswordField != null)
            {
                PasswordField.Dispose();
                PasswordField = null;
            }

            if (RegistrationButton != null)
            {
                RegistrationButton.Dispose();
                RegistrationButton = null;
            }
        }
コード例 #20
0
        public override void ViewDidLayoutSubviews( )
        {
            base.ViewDidLayoutSubviews( );

            HeaderLabel.Frame = new CGRect(0, View.Frame.Height * .05f, View.Frame.Width, HeaderLabel.Bounds.Height);

            Version.Layer.Position = new CGPoint((View.Bounds.Width - Version.Bounds.Width) / 2, HeaderLabel.Frame.Bottom);

            // measure and size the username field
            UserNameField.Bounds = new CGRect(0, 0, View.Bounds.Width * .40f, 0);
            CGSize size = UserNameField.SizeThatFits(UserNameField.Bounds.Size);

            UserNameField.Bounds = new CGRect(UserNameField.Bounds.X, UserNameField.Bounds.Y, UserNameField.Bounds.Width, (float)System.Math.Ceiling(size.Height * 1.25f));

            UserNameField.Layer.Position = new CGPoint((View.Bounds.Width - UserNameField.Bounds.Width) / 2, HeaderLabel.Frame.Bottom + 50);


            PasswordField.Bounds = new CGRect(0, 0, View.Bounds.Width * .40f, 0);
            size = PasswordField.SizeThatFits(PasswordField.Bounds.Size);
            PasswordField.Bounds = new CGRect(PasswordField.Bounds.X, PasswordField.Bounds.Y, PasswordField.Bounds.Width, (float)System.Math.Ceiling(size.Height * 1.25f));

            PasswordField.Layer.Position = new CGPoint((View.Bounds.Width - PasswordField.Bounds.Width) / 2, UserNameField.Frame.Bottom + 10);


            LoginButton.Bounds         = new CGRect(0, 0, 100, LoginButton.Bounds.Height);
            LoginButton.Layer.Position = new CGPoint((View.Bounds.Width - LoginButton.Bounds.Width) / 2, PasswordField.Frame.Bottom + 30);

            LoginResult.Frame = new CGRect(0, LoginButton.Frame.Bottom + 20, View.Frame.Width, LoginResult.Bounds.Height);

            float width  = 100;
            float height = 100;

            BusyIndicator.Frame = new RectangleF(((float)View.Bounds.Width - width) / 2, (float)LoginButton.Frame.Bottom + 100, width, height);
        }
コード例 #21
0
        private void AuthorizeLoginDialog()
        {
            Log.Write(GetType(), "AuthorizeLoginDialog");

            if (string.IsNullOrEmpty(Login))
            {
                MessageBox.Show("Pole <Login> nie może być puste!", "Błąd", MessageBoxButton.OK, MessageBoxImage.Error);
                LoginField.Focus();
            }
            else if (string.IsNullOrEmpty(Password))
            {
                MessageBox.Show("Pole <Hasło> nie może być puste!", "Błąd", MessageBoxButton.OK, MessageBoxImage.Error);
                PasswordField.Focus();
            }
            else
            {
                CzyZalogowany = OnAuthorizeLogin?.Invoke(this) ?? false;

                if (CzyZalogowany)
                {
                    Close();
                }
                else
                {
                    MessageBox.Show("Błędny login lub hasło!", "Błąd", MessageBoxButton.OK, MessageBoxImage.Error);
                    Clear();
                }
            }
        }
コード例 #22
0
ファイル: LoginPage.cs プロジェクト: MrPrzemek1/Jabbes-Panel
 public HomePage FillLoginFormAndSubmit(string login, string password)
 {
     LoginField.SendKeys(login);
     PasswordField.SendKeys(password);
     SubmitButton.Submit();
     return(new HomePage());
 }
コード例 #23
0
 public void PerformRequest()
 {
     PasswordField.Clear();
     // sending a single quote is not possible with the Chrome Driver, it sends two single quotes!
     PasswordField.SendKeys("pass'--");
     SubmitButton.Click();
 }
コード例 #24
0
        void ReleaseDesignerOutlets()
        {
            if (UserField != null)
            {
                UserField.Dispose();
                UserField = null;
            }

            if (NumberField != null)
            {
                NumberField.Dispose();
                NumberField = null;
            }

            if (PasswordField != null)
            {
                PasswordField.Dispose();
                PasswordField = null;
            }

            if (FeedbackLabel != null)
            {
                FeedbackLabel.Dispose();
                FeedbackLabel = null;
            }

            if (TextEditor != null)
            {
                TextEditor.Dispose();
                TextEditor = null;
            }
        }
コード例 #25
0
 public MainPage FillFormFieldsWithCorrectData(string userName, string password)
 {
     UserNameField.SendKeys(userName);
     PasswordField.SendKeys(password);
     BtnLogin.Submit();
     return(new MainPage());
 }
コード例 #26
0
        void ReleaseDesignerOutlets()
        {
            if (AliasTextField != null)
            {
                AliasTextField.Dispose();
                AliasTextField = null;
            }

            if (SecretKeyView != null)
            {
                SecretKeyView.Dispose();
                SecretKeyView = null;
            }

            if (PasswordField != null)
            {
                PasswordField.Dispose();
                PasswordField = null;
            }

            if (AddButton != null)
            {
                AddButton.Dispose();
                AddButton = null;
            }

            if (CancelButton != null)
            {
                CancelButton.Dispose();
                CancelButton = null;
            }
        }
コード例 #27
0
        public void FillRegisterForm()
        {
            //Wait for Filling form
            WebDriverWait wait = new WebDriverWait(_driver, TimeSpan.FromSeconds(20));

            wait.Until(pageLoaded => pageLoaded.FindElement(By.CssSelector(".std.box")).Displayed);

            //Fill the form
            GenderCheckboxLocator.Click();
            FirstNameLocator.SendKeys(firstName);
            LastNameLocator.SendKeys(lastName);
            PasswordField.SendKeys(password);
            Address1Field.SendKeys(street);
            CityField.SendKeys(city);
            PostcodeField.SendKeys(postalCode);
            MobilePhoneField.SendKeys(mobilePhone);

            //Clear the last field and send new text
            IWebElement myAddress = _driver.FindElement(By.Id("alias"));

            myAddress.Clear();
            myAddress.SendKeys("My address");

            //Select from the dropdown list
            IWebElement   element = StateDropdown;
            SelectElement select  = new SelectElement(element);

            select.SelectByText("Alabama");

            //Click Submitt Account
            SubmitAccountBtn.Click();
        }
コード例 #28
0
 public MailMainMenu Login(User user)
 {
     LoginField.SendKeys(user.Login);
     SubmitButton.Click();
     PasswordField.SendKeys(user.Password);
     SubmitButton.Click();
     return(new MailMainMenu(driver));
 }
コード例 #29
0
        /// <summary>
        /// Modifies window-elements and sets user to online if user gives correct input
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void LogInButton_Click(object sender, RoutedEventArgs e)
        {
            bool matchfound = Account.LogIn(UsernameField.Text, PasswordField.Text);

            CheckUserOnline(matchfound);
            UsernameField.Clear();
            PasswordField.Clear();
        }
コード例 #30
0
 // Login Method takes username and password and click on Login button
 // Waiting for the overlay to disappear
 public void LoginMethod(string username, string password)
 {
     UsernameField.SendKeys(username);
     PasswordField.SendKeys(password);
     Loginbtn.Click();
     _driver.ExplicitWait(10, "XPath", "/html/body/div[4]/h4");
     _driver.ExplicitWaitInvisible(10, "XPath", "/html/body/div[4]/h4");
 }
コード例 #31
0
		protected IStoragePasswordField CreateEmptyPasswordFieldObject(PasswordField field)
		{
			var storageService = service.StorageService;
			return (IStoragePasswordField)storageService.GetObjectFactory().CreateEmptyFieldObject(field.GetType());
		}
コード例 #32
0
ファイル: Form.cs プロジェクト: aicl/Cayita.Javascript
		public static void Execute(Atom parent)
		{
			var form = new Form ();
			new Fieldset (form, fs => {
				new Legend (fs,"Legend");
				new Label(fs, "LabelText");
				new TextInput(fs, i=>{
					i.Placeholder="type something";
					i.Name="text";
				});

				new Span(fs, s=>{s.Text="Example block-level help text here"; s.ClassName="help-block";});

				new CheckField(fs, cf=>{
					cf.Name="allow";
					cf.Input.Text="Check me";
					cf.Input.Checked=true;
				});

				new SubmitButton(fs, b=>{
					b.Text="Send";
					b.Clicked+= (e) =>{ 
						e.PreventDefault();
						form.JQuery.Serialize().LogInfo();
					};
				});
				form.Append(fs);
			});

			parent.JQuery.Append("Default styles".Header (3)).Append (form);

			var sform = new Form ();
			new TextInput (sform, i => {
				i.Name="stext";
				i.Placeholder="search for";
				i.Required=true;
				i.ClassName="input-medium search-query";
				i.MaxLength=8;
				i.MinLength=3;
			});

			new SubmitButton(sform, b=>{
				b.Text="Search...";
				b.Clicked+= (e) =>{ 
					if(!sform.CheckValidity()) return ;
					sform.JQuery.Serialize().LogInfo();
				};
			});

			parent.JQuery.Append("Optional Layouts".Header (3)).Append("Search Form".Header(4)).Append (sform);

			var lform = new Form ();
			lform.SubmitHandler = f =>  f.JQuery.Serialize().LogInfo() ;
			lform.ClassName = "form-inline";
			new EmailInput (lform, i => {
				i.Placeholder = "your email";
				i.Required=true;
				i.Name="email";
			});

			new PasswordInput (lform, i => {
				i.Placeholder = "your password";
				i.Required=true;
				i.Name="password";
				i.MinLength=4;
			});

			new CheckInput (lform,i =>{
				i.Name="remember";
				i.Text="Remember?";
				i.Checked=true;
			});
					
			new SubmitButton (lform, b => b.Text = "submit");
	
			parent.JQuery.Append("Inline Form".Header(4)).Append (lform);

			new Form (f=>{
				f.ClassName="form-horizontal";

				new EmailField(f,i=>{
					i.Text="Email";
					i.Placeholder="your email";
					i.Input.Required=true;
					i.Name="email";
				});

				new PasswordField(f,i=>{
					i.Text="Password";
					i.Placeholder="your password";
					i.Input.Required=true;
					i.Input.MinLength=4;
					i.Name="password";
				});

				new CheckField(f, i=>{
					i.Input.Text="Remember";
					i.Input.Checked=true;
					i.Name="remember";
					new SubmitButton(i.Controls, b=>	b.Text="Login");
				});

				f.SubmitHandler= fr=> fr.JQuery.Serialize().LogInfo();

				parent.JQuery.Append("Horizontal Form".Header(4)).Append (f);
			});


			var login = new Div ("span4 offset3 well");
			login.Append (new Legend("Login Form"));

			new Form (login, f => {
				var nm = new TextField(f);
				nm.Placeholder="user name";
				nm.Name ="username";
				nm.Input.ClassName="span12";
				nm.Input.Required=true;
				nm.Input.MinLength=8;

				var pwd = new PasswordField(f);
				pwd.Placeholder="password";
				pwd.Name ="password";
				pwd.Input.ClassName="span12";
				pwd.Input.Required=true;
				pwd.Input.MinLength=6;
				pwd.Input.MaxLength=10;

				var rmb = new CheckField(f);
				rmb.Name="remember";
				rmb.Input.Text="Remember";

				var sb = new SubmitButton(f);
				sb.Text="Login";
				sb.AddClass("btn-info btn-block");

				f.SubmitHandler= fr=>{
					sb.Disabled=true;
					Window.SetTimeout(()=>{  
						sb.Disabled=false;
						"Welcome {0}".Fmt(nm.Value).LogSuccess();
						f.Reset();
					}, 1000);  
				};

			});

			parent.JQuery.Append ("Samples".Header(3)).Append ("Login Form".Header(4))
				.Append (UI.CreateContainer(ct=> UI.CreateRow(ct, rw=> rw.Append(login))));

			var contact = new Div ("container");
			new Form (contact, f=>{
				f.ClassName="well span8";
				UI.CreateRowFluid(f, row=>{
					new Div(row, p=>{
						p.ClassName="span5";
						new TextField(p, tf=>{tf.Name="firstname"; tf.Required=true; tf.Text="FirstName"; tf.Input.ClassName="span12"; });
						new TextField(p, tf=>{tf.Name="lastname"; tf.Required=true; tf.Text="LastName"; tf.Input.ClassName="span12"; });
						new EmailField(p, tf=>{tf.Name="email"; tf.Required=true; tf.Text="Email";tf.Input.ClassName="span12";});

						new SelectField<string>(p, sf=>{
							sf.Text="Subject";
							sf.Name="subject";
							sf.Input.ClassName="span12";
							sf.Input.Add("", "Choose one...");
							sf.Input.Add("1", "General Customer Service");
							sf.Input.Add("2", "Suggestions");
							sf.Input.Add("3", "Product suport");
							sf.Input.Add("4", "Bug");
							sf.Input.Required=true;
						});

					});
					new Div(row, p=>{
						p.ClassName="span7";
						new TextAreaField(p, tf=>{tf.Name="message"; tf.Rows=11; tf.Text="Message";tf.Input.ClassName="span12";});
					});

					new SubmitButton(row, bt=>{  
						bt.AddClass("btn-primary pull-right");  
						bt.Text="Send";  
					});  
				});

				f.SubmitHandler=fr=> AlertFn.Success(fr.FirstChild,"Message sent",true, 5000);
			});

			parent.JQuery.Append("Conctact Form".Header(4)).Append (contact);

			parent.Append ("C# code".Header(3));

			var rq =jQuery.GetData<string> ("code/demoform.html");
			rq.Done (s=> {
				var code=new Div();
				code.InnerHTML= s;
				parent.Append(code);
			});

		
		}