I got a problem for ASP.net MCV database controllar

Discussion in 'Programming General' started by meodows92, May 9, 2011.

I got a problem for ASP.net MCV database controllar
  1. Unread #1 - May 9, 2011 at 3:32 AM
  2. meodows92
    Joined:
    Jun 8, 2009
    Posts:
    232
    Referrals:
    0
    Sythe Gold:
    0

    meodows92 Active Member

    I got a problem for ASP.net MCV database controllar

    Hi to alll sythe member, i got a problem to ask you all, which around me about 2 months.

    My project is about web programming and we encounter this problem which is Register, the code of the controller is below.


    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.Mvc;
    //____________________________________________________
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;
    using System.Web.Mvc;


    namespace MVC_eLibrary.Controllers
    {
    [Bind(Exclude = "UserID")]
    public partial class Order
    {
    [ScaffoldColumn(false)]
    public int UserID { get; set; }
    [ScaffoldColumn(false)]

    public int Username { get; set; }
    [Required(ErrorMessage = "Username is required")]
    [StringLength(20)]

    public string Password { get; set; }
    [Required(ErrorMessage = "Password is required")]
    [StringLength(20)]

    public string Email { get; set; }
    [Required(ErrorMessage = "Email is required")]
    [StringLength(50)]

    public string Phone { get; set; }
    [Required(ErrorMessage = "Phone is required")]
    [StringLength(10)]


    public string Company { get; set; }
    [StringLength(30)]

    public string Address { get; set; }
    [StringLength(50)]


    [RegularExpression(@"[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}",ErrorMessage = "Email is is not valid.")]
    [DataType(DataType.EmailAddress)]
    public string Email { get; set; }
    [ScaffoldColumn(false)]

    public List<OrderDetail> OrderDetails { get; set; }

    }
    }





    I just want to know how to store information to the Data Base which just type in the webpage of database. No spamming hear ok i need to submit this project.
     
< Buying a simple bot. | Just starting. Need advice! >

Users viewing this thread
1 guest


 
 
Adblock breaks this site