Cursos técnicos gratuitos en línea

Similar documents
COOKBOOK Sending an in Response to Actions

LAMPIRAN. 1. Source Code Data Buku. using System; using System.Collections.Generic; using System.Data; using System.Data.Entity; using System.

Description: This feature will enable user to send messages from website to phone number.

MVC :: Understanding Views, View Data, and HTML Helpers

FatModel Quick Start Guide

Justin Jones 21 st February 2013 Version 1.1 Setting up an MVC4 Multi-Tenant Site

MICRO SERVICES ARCHITECTURE

Developing and deploying MVC4/HTML5 SDK application to IIS DigitalOfficePro Inc.

Babu Madhav Institute of information technology 2016

Lampiran. SetoransController

Single user Installation. Revisión: 13/10/2014

SportsStore: Administration

20 Recipes for Programming MVC 3


Documentación GT_Complemento_Exportaciones xsd Factura Electrónica en Línea

Developing Applications with Java Persistence API (JPA)

MVC :: Preventing JavaScript Injection Attacks. What is a JavaScript Injection Attack?

SAP EDUCACION. New SAP Professional: N-SAP. A Training Initiative of the SAP. April External

WINDOWS SERVER - SERVICIOS AVANZADOS

Introducing Models. Data model: represent classes that iteract with a database. Data models are set of

Latest Press Release. Spotify: free coupon codes

Caso de Estudio: Parte II. Diseño e implementación de. Integración de Sistemas. aplicaciones Web con.net

Using Visual Studio 2017

ASP.NET MVC Music Store Tutorial

Important Change to the Year End W2 Process

Forma't a l'escola del Gremi d'instal ladors de Barcelona

Blackbird Books and Supplies

MICROSOFT Course 20411: Administering Windows Server 2012

Diseño de la capa de datos para el POS

AvePoint Office Connect Online Manager 1.0

Create Faculty Membership Account. This step-by-step guide takes you through the process to create a Faculty Membership Account.

Enterprise Systems & Frameworks

Annex B: Prototype Draft Model Code. April 30 th, 2015 Siamak Khaledi, Ankit Shah, Matthew Shoaf

WorkPlace Agent Service

HangFire Documentation

MVC :: Understanding Models, Views, and Controllers

INTOSAI EXPERTS DATABASE

Collaborate with Your Care Teams

IBM InfoSphere MDM Reference Data Management V10

Installation guide. WebChick. Installation guide for use on local PC

Manual De Adobe Photoshop Cs3 En Espanol File Type

ANX-PR/CL/ LEARNING GUIDE

ASP.NET MVC 3 Using C# Rev. 3.0

Live Help On Demand Analytics

Network Online Services How to Register Guide

EVALUATION COPY. Unauthorized reproduction or distribution is prohibitied ASP.NET MVC USING C#

One Port Router. Installation Guide. It s about Quality of life

RMH RESOURCE EDITOR USER GUIDE

Action-packed controllers

Visual C# 2012 How to Program by Pe ars on Ed uc ati on, Inc. All Ri ght s Re ser ve d.

Configuración del laboratorio de acceso telefónico de clientes (San José, Estados Unidos)

ECOPETROL BARRANCABERJEJA. INTERFACES AL SERVIDOR PI:

INTRO TO ASP.NET MVC JAY HARRIS.NET DEVELOPER

Service Desk Mobile App 1.0 Mobile App Quick Start. March 2018

IN ACTION. Jeffrey Palermo Jimmy Bogard Eric Hexter Matthew Hinze Jeremy Skinner. Phil Haack. Third edition of ASP.NET MVC in Action FOREWORD BY

Create Individual Membership. This step-by-step guide takes you through the process to create an Individual Membership.

Custom Location Extension

Filr 3.3 Using Micro Focus Filr with Microsoft Office and Outlook Applications. December 2017

SharePoint SQL 2016 qué hay de nuevo?

DOWNLOAD OR READ : WINAMP USER MANUAL FULL PDF EBOOK EPUB MOBI

RIG 600LX QUICK START GUIDE. plantronics.com/setup/rig-600lx. plantronics.com/support GUIDE DE DÉMARRAGE RAPIDE

reinsight Mobile Quick Start Guide

CONFIGURING SSO FOR FILENET P8 DOCUMENTS

Tutorials Php Y Jquery Mysql Database Without Refreshing Code

Module 4 Microsoft Azure Messaging Services

PSEUDOCODE. It is a conventional code to represent an algorithm

IBM Security QRadar Version Customizing the Right-Click Menu Technical Note

Intel Platform Administration Technology Quick Start Guide

Customer Online Support Demonstration. 1

Monetra. POST Protocol Specification

Sesión 2: PL 1b: Gestión de sistemas en tiempo real para prototipado rápido de controladores (MathWorks).

Upgrading to Watson Explorer Version or IBM

Bazaarvoice hosted authentication reference and implementation guide

Once an account is created, a vendor can also update contact information, view orders, and submit electronic invoices.

LexisNexis C.L.U.E. Auto Fixed Length Input File Mapping Insurance Solutions Portal

Oracle Hospitality OPERA Exchange Interface Cloud Authentication. October 2017

User guide. Bloomberg Legal Entity Identifier (LEI) web platform

Upgrading to Watson Explorer Version 8.2-5, , or IBM

This document contains the steps which will help you to submit your business to listings. The listing includes both business and contact information.

How to Register your Application Online

E-BOOK # EPSON STYLUS SX440W SCANNER MAC EBOOK

AvePoint PTO Manager

Working with Controllers

5 Years Integrated M.Sc. (IT) 6th Semester Web Development using ASP.NET MVC Practical List 2016

CIBC Government Payment and Filing Service Reference Guide

Create Extensions App inventor 2 Build Extensions App Inventor, easy tutorial - Juan Antonio Villalpando

OpenManage Management Pack for vrealize Operations Manager Version 1.0 Installation Guide

ford residence southampton, ny Msn hotmail

Guidelines. Table of Contents. Welcome Letter

Authentication Service Api Help Guide

Stay on Top of Your Day

Configuring Microsoft Windows Shared

ABAP BREVE MANUAL EBOOK

AT&T Internet Reservations System (IRES) for IBM

Government Payment and Filing Service. Commercial Banking and Large Corporate Clients. Reference. Guide

For your convenience Apress has placed some of the front matter material after the index. Please use the Bookmarks and Contents at a Glance links to

Mobile On the Go (OTG) Server

Best practices. Starting and stopping IBM Platform Symphony Developer Edition on a two-host Microsoft Windows cluster. IBM Platform Symphony

Award and Key Contact Information. * = required field. *AWARD CATEGORY Please select the award category you are entering (select one only): (01) Books

How to Register your Application Online

Transcription:

Microsoft Virtual Academy Cursos técnicos gratuitos en línea Tome un curso gratuito en línea. http://www.microsoftvirtualacademy.com

Microsoft Virtual Academy Aprendiendo a Programar

Validando

Validando

Validación en el servidor

Validación en el servidor - Modelo using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace MvcSimpleModelBinding.Models public class Person public int Id get; set; public string Name get; set; public int Age get; set; public string Street get; set; public string City get; set; public string State get; set; public int Zipcode get; set;

Validación en el servidor - Controller public class PersonController : Controller static List<Person> people = new List<Person>(); public ActionResult Index() return View(people); public ActionResult Details(Person person) return View(person);... public ActionResult Create() return View(); [AcceptVerbs(HttpVerbs.Post)] public ActionResult Create(Person person) if (!ModelState.IsValid) return View("Create", person); people.add(person); return RedirectToAction("Index");

Validación en el servidor Vista Index @using MvcSimpleModelBinding.Models; @ ViewBag.Title = "Index"; <h2>listado</h2> <table> <tr> <th></th> <th>id</th> <th>nombre</th> </tr> @foreach (Person person in Model) <tr> <td>@html.actionlink("ver Detalle", "Details", person)</td> <td>@html.encode(person.id)</td> <td>@html.encode(person.name)</td> </tr> </table> <p>@html.actionlink("crear Nueva Persona", "Create")</p>

Validación en el servidor Vista Create @using MvcSimpleModelBinding.Models; @ ViewBag.Title = "Create"; <h2>crear</h2> @using (Html.BeginForm()) @Html.ValidationSummary() <fieldset> <legend>campos</legend> <p><label for="id">id:</label>@html.textbox("id") @Html.ValidationMessage("Id", "*") </p> <p><label for="name">nombre:</label>@html.textbox("name") @Html.ValidationMessage("Name", "*") </p> <p><label for="age">edad:</label>@html.textbox("age") @Html.ValidationMessage("Age", "*") </p> <p><label for="street">dirección:</label>@html.textbox("street") @Html.ValidationMessage("Street", "*") </p> <p><label for="city">ciudad:</label>@html.textbox("city") @Html.ValidationMessage("City", "*") </p> <p><label for="state">provincia:</label>@html.textbox("state") @Html.ValidationMessage("State", "*") </p> <p><label for="zipcode">c.postal:</label>@html.textbox("zipcode") @Html.ValidationMessage("Zipcode", "*") </p> <p><input type="submit" value="create" /> </p> </fieldset> <div>@html.actionlink("volver al Listado", "Index")</div>

Validación en el servidor Vista Details @using MvcSimpleModelBinding.Models; @ ViewBag.Title = "Details"; <h2>detalle</h2> <fieldset> <legend>campos</legend> <p>id: @Html.Encode(Model.Id) </p> <p>nombre: @Html.Encode(Model.Name) </p> <p>edad: @Html.Encode(Model.Age) </p> <p>dirección: @Html.Encode(Model.Street) </p> <p>ciudad: @Html.Encode(Model.City) </p> <p>provincia: @Html.Encode(Model.State) </p> <p>c. Postal: @Html.Encode(Model.Zipcode) </p> </fieldset> <p>@html.actionlink("volver al Listado", "Index") </p> Mas información y tutoriales en: http://www.asp.net/mvc/tutorials/mvc-5/ introduction/getting-started

Validación en el servidor - Contras

Validación en el cliente - JavaScript function validateform() var x=document.forms["myform"]["fname"].value; if (x==null x=="") alert("first name must be filled out"); return false; return validateform()

Validación en el cliente - JavaScript

Validación en el cliente http://jqueryvalidation.org/

Enviando correos

Enviando correos - Modelo public class CorreoModel public string From get; set; public string To get; set; public string Subject get; set; public string Body get; set; Luego en la carpeta Controller crearemos un nuevo controlador llamado EnviarCorreoController

Enviando correos - Controlador using System; using System.Collections.Generic; using System.Linq; using System.Net.Mail; using System.Web; using System.Web.Mvc; namespace EnviarCorreo.Controllers public class EnviarCorreoController : Controller // // GET: /EnviarCorreo/ public ActionResult Index() return View(); [HttpPost] public ActionResult Index(EnviarCorreo.Models.CorreoModel _objmodelmail) if (ModelState.IsValid) MailMessage mail = new MailMessage(); mail.to.add(_objmodelmail.to); mail.from = new MailAddress(_objModelMail.From); mail.subject = _objmodelmail.subject; string Body = _objmodelmail.body;

Enviando correos - Controlador mail.body = Body; mail.isbodyhtml = true; SmtpClient smtp = new SmtpClient(); smtp.host = "smtp.outlook.com"; smtp.port = 587; smtp.usedefaultcredentials = false; smtp.credentials = new System.Net.NetworkCredential ("username", "password");// Enter seders User name and password smtp.enablessl = true; smtp.send(mail); return View("Index", _objmodelmail); else return View(); Y finalmente, en la carpeta de vistas, tendremos Index.cshtml

Enviando correos - Vista @model EnviarCorreo.Models.CorreoModel @ ViewBag.Title = "Index"; <h2>index</h2> <fieldset> <legend>send Email</legend> @using (Html.BeginForm()) @Html.ValidationSummary() <p>from: </p> <p>@html.textboxfor(m=>m.from)</p> <p>to: </p> <p>@html.textboxfor(m=>m.to)</p> <p>subject: </p> <p>@html.textboxfor(m=>m.subject)</p> <p>body: </p> <p>@html.textareafor(m=>m.body)</p> <input type ="submit" value ="Send" /> </fieldset>

Explicando nuestro ejemplo En el controlador tenemos un código que dice: ViewResult Index (EnviarCorreo.Models.CorreoModel _objmodelmail) En este método, tenemos un dato que tiene la forma de nuestro CorreoModel. Luego creamos un dato MailMessage y le completamos toda la información que necesita: To From Cc Bcc Subject Body

Explicando nuestro ejemplo

Interfaces avanzadas

Interfaces avanzadas https://jqueryui.com/

Interfaces avanzadas http://www.microsoft.com/en-us/default.aspx http://www.microsoft.com/surface/en-us http://windows.microsoft.com/en-us/windows/home http://whois.wildlife.la/ http://www.fk-agency.com/ http://www.sweez.com.br/ http://www.l2systems.com http://www.tridentpp.com/ http://tomerlerner.com http://flashvhtml.com/ http://nasaprospect.com/

Persistiendo

Persistiendo

Persistiendo

2016 Microsoft Corporation. All rights reserved. The text in this document is available under the Creative Commons Attribution 3.0 License, additional terms may apply. All other content contained in this document (including, without limitation, trademarks, logos, images, etc.) are not included within the Creative Commons license grant. This document does not provide you with any legal rights to any intellectual property in any Microsoft product. You may copy and use this document for your internal, reference purposes. This document is provided "as-is." Information and views expressed in this document, including URL and other Internet Web site references, may change without notice. You bear the risk of using it. Some examples are for illustration only and are fictitious. No real association is intended or inferred. Microsoft makes no warranties, express or implied, with respect to the information provided here.