Need some help making the 2nd line of this code functional, need the [Compare] function to validate the confirm email as the same as email.
[Required] [EmailAddress] public string Email { get; set; }
[Required] [DisplayName("Confirm Email")] [Compare] public string ConfirmEmail { get; set; }
Dear Student ,
As per the requirement submitted above , kindly find the below solution.
Here a new web application in asp.net with C# is created using Visual Studio 2017 with name "MVCApp".This application contains a below model class.
Sample.cs :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;
namespace MVCApp.Models
{
public class Sample //C# class
{
//Email
[Required] [EmailAddress] public string Email { get; set; }
//ConfirmEmail
[Required]
[DisplayName("Confirm Email")]
[Compare(nameof(Email),ErrorMessage ="Email Mismatch")]
public string ConfirmEmail { get; set; }
}
}
======================================================
Output : Run application using F5 and will get the screen as shown below
Screen 1 :When controller and views are added then will get the screen as shown below

Screen 2:When email and confirm email is mismatch

NOTE : PLEASE FEEL FREE TO PROVIDE FEEDBACK ABOUT THE SOLUTION.
Need some help making the 2nd line of this code functional, need the [Compare] function to...
Hey Guys I am doing a project and need some help with code in HTML and PHP. I need a form made in HTML that can be sent to a specific email through PHP. For some reason the info is not getting sent to my email, even though it says that it was sent. I have some source code here: <?php if(isset($_POST['submit'])) { $name = $_POST['name']; $email = $_POST['email']; $subject = $_POST['subject']; $message = $_POST['message']; $email = mail('MY_EMAIL', $subject, $message,...
DUE TODAY: Need Help with my ASP NET quiz 1.) [________________] attribute is added to ensure two properties on a model object have the same value. 2.) What is the purpose of the following annotation? [StringLength (120, MinimumLength=10)] public string Firstname {get; set} public string Lastname {get;set;} a. FirstName and LastName can be of length 160 characters b. FirstName and LastName can be of length 10 characters c. FirstName can be of length between 10 and 120 character s d....
I need help with adding comments to my code and I need a uml diagram for it. PLs help.... Zipcodeproject.java package zipcodesproject; import java.util.Scanner; import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; public class Zipcodesproject { /** * @param args the command line arguments */ public static void main(String[] args) { Scanner input=new Scanner(System.in); BufferedReader reader; int code; String state,town; ziplist listOFCodes=new ziplist(); try { reader = new BufferedReader(new FileReader("C:UsersJayDesktopzipcodes.txt")); String line = reader.readLine(); while (line != null) { code=Integer.parseInt(line); line =...
I need help with this code This is what I need to do: Implement the Stack Class with an ArrayList instead of an array, including the following functions: • empty • push • peek • pop • overrided toString( ) function which returns all of the stack’s contents Things to note: • You no longer need a size. • You no longer need to define a constant DEFAULT_CAPACITY. Since ArrayLists grow dynamically. • Whenever possible, use ArrayList functions instead of...
Hello, I need some help creating this class in Java. This is for a larger project. I am using Eclipse if that helps 1. Create a class named State that will store information about a state and provide methods to get, and set the data, and compare the states by several fields. a. Fields: Name, Capital City, Abbreviation, Population, Region, US House Seats b. Constructor c. Get and set methods for each field d. Compare method to compare State objects...
I need help with my Java code. A user enters a sentence and the program will tell you what words were duplicated and how many times. If the same word is in the sentence twice, but one is capitalized, it will not count it as a duplicate. How can I make the program read the same word as the same word, even if one is capitalized and the other is not? For example, "the" and "The" should be counted as...
Hey everyone, I need help making a function with this directions
with C++ Language.
Can you guys use code like printf and fscanf without iostream or
fstream because i havent study that yet.
Thanks.
Directions: Write a function declaration and definition for the char* function allocCat. This function should take in as a parameter a const Words pointer (Words is a defined struct) The function should allocate exactly enough memory for the concatenation of all of the strings in the...
I need help running this code. import java.util.*; import java.io.*; public class wordcount2 { public static void main(String[] args) { if (args.length !=1) { System.out.println( "Usage: java wordcount2 fullfilename"); System.exit(1); } String filename = args[0]; // Create a tree map to hold words as key and count as value Map<String, Integer> treeMap = new TreeMap<String, Integer>(); try { @SuppressWarnings("resource") Scanner input = new Scanner(new File(filename));...
Need some help with this UNIX problem: Write a single line UNIX command to mail only the process ID of running Java program test to the email test@fsu.edu