Posts

Showing posts from May, 2016

The 'System.Web.Security.SqlMembershipProvider' requires a database schema compatible with schema version '1'. However, the current database schema is not compatible with this version. You may need to either install a compatible schema with aspnet_regsql.exe (available in the framework installation directory), or upgrade the provider to a newer version.

Image
  Use this SQL Code Run-In your Query. INSERT INTO dbo . aspnet_SchemaVersions VALUES ( 'common' , 1 , 1 ), ( 'membership' , 1 , 1 ), ( 'role manager' , 1 , 1 ), ( ' health monitoring ' , 1 , 1 ), ( ' personalization ' , 1 , 1 ), ( ' profile ' , 1 , 1 ); GO

Loading DropDownList in MVC and Webservice

Image
Model Class~~StdModel.cs public class StdModel     {         public int Opt { get ; set ; }         public int StdID { get ; set ; }         [ Required (ErrorMessage= "Please Enter RollNo" )]         public string RollNo { get ; set ; }         [ Required (ErrorMessage = "Please Enter StudentName" )]         public String StudentName { get ; set ; }                 [ Required (ErrorMessage = "Please Enter Religion" )]         public string Religion { get ; set ; }         [ Required (ErrorMessage = "Please Enter Age" )]         public int Age { get ; set ; }         [ Required (ErrorMessage = "Please Enter Class" )]         public string Class { get ; set ; }         [ Required (ErrorMessage = "Please Enter FatherName" )]         public string FatherName { get ; set ; }         public List < GridStdModel > ListStdModel = new List < GridStdModel &

MVC Application

Image
MVC Structure:                                                                 Application Structure:   Create New MVC Project  Add New Folder DataAccessLayer and Create Class DBcode.cs DBcode.cs using System; using System.Collections.Generic; using System.Configuration; using System.Data.SqlClient; using System.Linq; using System.Web; using SMS.Models; using System.Data; namespace SMS.DLayer {     public class DBcode     {                 public SqlConnection Con()         {             SqlConnection Cn = new SqlConnection ( ConfigurationManager .ConnectionStrings[ "DB" ].ToString());             return Cn;         }         public string Insert( StdModel StdCls)         {             SqlConnection cn = Con();                         SqlCommand cmd = new SqlCommand ( "SP_SMS" ,cn);             cmd.CommandType = CommandType .StoredProcedure;             cmd.Param