<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>code for asp.net &#187; Asp.net MVC</title>
	<atom:link href="http://www.codeforasp.net/category/asp-net-mvc/feed" rel="self" type="application/rss+xml" />
	<link>http://www.codeforasp.net</link>
	<description>More about asp.net ajax silverlight MVC</description>
	<lastBuildDate>Tue, 02 Mar 2010 10:17:59 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Multiple Dropdownlist in Asp.net MVC</title>
		<link>http://www.codeforasp.net/multiple-dropdownlist-in-asp-net-mvc.html</link>
		<comments>http://www.codeforasp.net/multiple-dropdownlist-in-asp-net-mvc.html#comments</comments>
		<pubDate>Sat, 31 Oct 2009 04:33:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Asp.net MVC]]></category>
		<category><![CDATA[Controls]]></category>
		<category><![CDATA[dropdownlist]]></category>
		<category><![CDATA[Html.DropDownList]]></category>
		<category><![CDATA[jsonResult]]></category>
		<category><![CDATA[MVC dropdown autopostback]]></category>

		<guid isPermaLink="false">http://www.codeforasp.net/?p=452</guid>
		<description><![CDATA[Create Database Purchase then create two tables in Purchase Database
Category table and Subcategory table
Goto Category and SubCategory tables
Steps to Create Multiple DropDownlist controls in Asp.net MVC
Start -&#62; Programs -&#62; choose VS2008 or 2005 -&#62; File-&#62; Project -&#62; choose web (project type Visual C#) -&#62;choose Asp.Net MVC Web Application -&#62; Application name is myFirstMVCapp -&#62; Go [...]]]></description>
		<wfw:commentRss>http://www.codeforasp.net/multiple-dropdownlist-in-asp-net-mvc.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Upload Files in Asp.net MVC</title>
		<link>http://www.codeforasp.net/how-to-upload-files-in-asp-net-mvc.html</link>
		<comments>http://www.codeforasp.net/how-to-upload-files-in-asp-net-mvc.html#comments</comments>
		<pubDate>Fri, 30 Oct 2009 04:38:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Asp.net MVC]]></category>
		<category><![CDATA[Controls]]></category>
		<category><![CDATA[ActionResult]]></category>
		<category><![CDATA[Html.BeginForm]]></category>
		<category><![CDATA[HttpPostedFileBase]]></category>
		<category><![CDATA[mvc file]]></category>
		<category><![CDATA[mvc File upload control]]></category>

		<guid isPermaLink="false">http://www.codeforasp.net/?p=445</guid>
		<description><![CDATA[FileUpload Control
Model folder contains:  Purchase.dbml, IMediaRepository.cs Interface and MediaRepository.cs class file
Controller: Create New controller MediaController
View: Create New Folder name is Media
if controller name MediaController
view folder name is Media (see the below figure round controller and view folder name )
Note: Create Folder in Project SolutionExplorer name is Uploads

 
 
IMediaRepository.cs
 
public interface IMediaRepository
{
void Add(Media media);
void Save();
} [...]]]></description>
		<wfw:commentRss>http://www.codeforasp.net/how-to-upload-files-in-asp-net-mvc.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Retrieve data from database using asp.net mvc and dropdownlist</title>
		<link>http://www.codeforasp.net/retrieve-data-from-database-using-asp-net-mvc-and-dropdownlist.html</link>
		<comments>http://www.codeforasp.net/retrieve-data-from-database-using-asp-net-mvc-and-dropdownlist.html#comments</comments>
		<pubDate>Thu, 29 Oct 2009 05:47:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Asp.net MVC]]></category>
		<category><![CDATA[Controls]]></category>
		<category><![CDATA[asp.net mvc database]]></category>
		<category><![CDATA[Html.DropDownList]]></category>
		<category><![CDATA[mvc dropdownlist]]></category>
		<category><![CDATA[ViewData["CustomerID"]]]></category>

		<guid isPermaLink="false">http://www.codeforasp.net/?p=430</guid>
		<description><![CDATA[Step a: Using Model (Purchase.dbml) class are ICustomerRepository and
Customer Repository.
Part1: How to create Linq to sql classess   (Purchase.dbml)

Part2: How to create Repository Pattern in Model (ICustomerRepository and CustomerRepository)

Step b: Creating controller in Controller folder name is DropdownController
 
 PurchaseDataContext db = new PurchaseDataContext();
public ActionResult Index()
{
ViewData["CustomerID"] = new SelectList
(
db.tblCustomers,
&#8220;CustomerID&#8221;,
&#8220;Name&#8221;
);
return View();
}
Step c: Go to View Folder in [...]]]></description>
		<wfw:commentRss>http://www.codeforasp.net/retrieve-data-from-database-using-asp-net-mvc-and-dropdownlist.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Validation in Asp.net MVC</title>
		<link>http://www.codeforasp.net/validation-in-asp-net-mvc.html</link>
		<comments>http://www.codeforasp.net/validation-in-asp-net-mvc.html#comments</comments>
		<pubDate>Thu, 29 Oct 2009 05:01:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Asp.net MVC]]></category>
		<category><![CDATA[Validations]]></category>
		<category><![CDATA[AddModelError]]></category>
		<category><![CDATA[asp.net mvc validation]]></category>
		<category><![CDATA[ModelState]]></category>
		<category><![CDATA[MVC Email validation]]></category>
		<category><![CDATA[Phone no validation]]></category>
		<category><![CDATA[regex]]></category>

		<guid isPermaLink="false">http://www.codeforasp.net/?p=426</guid>
		<description><![CDATA[Create a new record in MVC (Create.aspx)
This article contain validation for
Empty values
Email validation
PhoneNo validation
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Create(tblCustomer customer)
{
if (customer.Name.Trim().Length == 0)
ModelState.AddModelError(&#8221;Name&#8221;, &#8220;First name is required.&#8221;);
if (!Regex.IsMatch(customer.PhoneNo, @&#8221;\b\d{7}&#8221;))
ModelState.AddModelError(&#8221;PhoneNo&#8221;, &#8220;Invalid phone number.&#8221;);
if (!Regex.IsMatch(customer.EmailID, @&#8221;^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$&#8221;))
ModelState.AddModelError(&#8221;EmailID&#8221;, &#8220;Invalid email address.&#8221;);
if (!ModelState.IsValid)
return View();
try
{
//TODO: Add insert logic here
customerRepository.Add(customer);
customerRepository.Save();
return RedirectToAction(&#8221;Details&#8221;, new { id = customer.CustomerID });
}
catch
{
return View();
}
}
To match a date in mm/dd/yyyy format, rearrange [...]]]></description>
		<wfw:commentRss>http://www.codeforasp.net/validation-in-asp-net-mvc.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delete database data using Asp.net MVC</title>
		<link>http://www.codeforasp.net/delete-database-data-using-asp-net-mvc.html</link>
		<comments>http://www.codeforasp.net/delete-database-data-using-asp-net-mvc.html#comments</comments>
		<pubDate>Thu, 29 Oct 2009 04:42:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Asp.net MVC]]></category>
		<category><![CDATA[CRUD operations]]></category>
		<category><![CDATA[delete actionresult]]></category>
		<category><![CDATA[delete database record]]></category>
		<category><![CDATA[delete.aspx mvc]]></category>
		<category><![CDATA[mvc empty page]]></category>

		<guid isPermaLink="false">http://www.codeforasp.net/?p=422</guid>
		<description><![CDATA[Part1: start MVC application
Part2: How to create Linq to sql classess
Part3: How to create Repository Pattern in Model
Part4: Display data using MVC (Details.aspx)
Part 5: Create a new record in MVC (Create.aspx)
part 6: Edit record in MVC (Edit.aspx)
Delete The Customer
Step a: Go to Model in solution Explorer -&#62; open ICustomerRepository
add below code to retrieve all the [...]]]></description>
		<wfw:commentRss>http://www.codeforasp.net/delete-database-data-using-asp-net-mvc.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Edit Database data using Asp.net MVC</title>
		<link>http://www.codeforasp.net/edit-database-data-using-asp-net-mvc.html</link>
		<comments>http://www.codeforasp.net/edit-database-data-using-asp-net-mvc.html#comments</comments>
		<pubDate>Wed, 28 Oct 2009 05:34:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Asp.net MVC]]></category>
		<category><![CDATA[CRUD operations]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[CRUD operation in MVC]]></category>
		<category><![CDATA[Edit in MVC]]></category>
		<category><![CDATA[getdatabyid in MVC]]></category>
		<category><![CDATA[Save in MVC]]></category>
		<category><![CDATA[Update in MVC]]></category>
		<category><![CDATA[UpdateModel]]></category>
		<category><![CDATA[View content Edit]]></category>

		<guid isPermaLink="false">http://www.codeforasp.net/?p=403</guid>
		<description><![CDATA[Part1: start MVC application
Part2: How to create Linq to sql classess
Part3: How to create Repository Pattern in Model
Part4: Display data using MVC
Part 5: Create a new record in MVC
Details GetCustomerDetailsByID
Step a:public interface ICustomerRepository
{
tblCustomer GetCustomerByID(int id);
}
Step b: public tblCustomer GetCustomerByID(int id)
{
return db.tblCustomers.SingleOrDefault(c =&#62; c.CustomerID == id);
}
Stepc: public ActionResult Details(int id)
{
tblCustomer customer = customerRepository.GetCustomerByID(id);
return View(customer);
}
Step d: Go [...]]]></description>
		<wfw:commentRss>http://www.codeforasp.net/edit-database-data-using-asp-net-mvc.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>create new record in asp.net mvc</title>
		<link>http://www.codeforasp.net/create-new-record-in-asp-net-mvc.html</link>
		<comments>http://www.codeforasp.net/create-new-record-in-asp-net-mvc.html#comments</comments>
		<pubDate>Wed, 28 Oct 2009 05:19:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Asp.net MVC]]></category>
		<category><![CDATA[CRUD operations]]></category>
		<category><![CDATA[create new record in mvc]]></category>
		<category><![CDATA[insert data mvc]]></category>
		<category><![CDATA[mvc Repository Add]]></category>
		<category><![CDATA[MVC Repository save]]></category>
		<category><![CDATA[View content create]]></category>

		<guid isPermaLink="false">http://www.codeforasp.net/?p=400</guid>
		<description><![CDATA[Part1: start MVC application
Part2: How to create Linq to sql classess
Part3: How to create Repository Pattern in Model
Part4: Display data using MVC
Read Above four links before reading below insert data
Insert data into database using asp.net mvc
Step a: Go to Model in solution Explorer -&#62; open ICustomerRepository
add below code to retrieve all the customers
public interface ICustomerRepository
{
IQueryable&#60;tblCustomer&#62; [...]]]></description>
		<wfw:commentRss>http://www.codeforasp.net/create-new-record-in-asp-net-mvc.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Retrieve data from database using asp.net MVC</title>
		<link>http://www.codeforasp.net/retrieve-data-from-database-using-asp-net-mvc.html</link>
		<comments>http://www.codeforasp.net/retrieve-data-from-database-using-asp-net-mvc.html#comments</comments>
		<pubDate>Wed, 28 Oct 2009 04:52:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Asp.net MVC]]></category>
		<category><![CDATA[CRUD operations]]></category>
		<category><![CDATA[display database data using mvc]]></category>
		<category><![CDATA[HTML.Encode]]></category>
		<category><![CDATA[MVC view list]]></category>
		<category><![CDATA[partial view]]></category>
		<category><![CDATA[retrieve data from mvc]]></category>

		<guid isPermaLink="false">http://www.codeforasp.net/?p=394</guid>
		<description><![CDATA[Part1: start MVC application
Part2: How to create Linq to sql classess
Part3: How to create Repository Pattern in Model
see above links related to below steps
Step a: Go to Model in solution Explorer -&#62; open ICustomerRepository
add below code to retrieve all the customers
public interface ICustomerRepository
{
IQueryable&#60;tblCustomer&#62; GetCustomers();
} 
Step b: Again Go to Model in Solution Explorer -&#62; open [...]]]></description>
		<wfw:commentRss>http://www.codeforasp.net/retrieve-data-from-database-using-asp-net-mvc.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Asp.net MVC Interface and MVC Repository Pattern</title>
		<link>http://www.codeforasp.net/asp-net-mvc-interface-and-mvc-repository-pattern.html</link>
		<comments>http://www.codeforasp.net/asp-net-mvc-interface-and-mvc-repository-pattern.html#comments</comments>
		<pubDate>Mon, 26 Oct 2009 12:41:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Asp.net MVC]]></category>
		<category><![CDATA[CRUD operations]]></category>
		<category><![CDATA[asp.net mvc controller]]></category>
		<category><![CDATA[asp.net mvc interface]]></category>
		<category><![CDATA[asp.net mvc repository]]></category>
		<category><![CDATA[create mvc views]]></category>
		<category><![CDATA[mvc action result]]></category>
		<category><![CDATA[mvc class file]]></category>
		<category><![CDATA[mvc interface]]></category>
		<category><![CDATA[Mvc model and repository]]></category>
		<category><![CDATA[mvc repository]]></category>

		<guid isPermaLink="false">http://www.codeforasp.net/?p=380</guid>
		<description><![CDATA[Before learning MVC interface and Repository pattern. Read below two links first (start MVC and Linq to Sql Classes
Part1: start MVC application
Part2: How to create Linq to sql classess
View Above links they are related to below process


Create Interface in MVC Application
Step 1:  Go to Model Folder -&#62; right click Add new Item -&#62; then [...]]]></description>
		<wfw:commentRss>http://www.codeforasp.net/asp-net-mvc-interface-and-mvc-repository-pattern.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to create Linq to SQL Class</title>
		<link>http://www.codeforasp.net/how-to-create-linq-to-sql-class.html</link>
		<comments>http://www.codeforasp.net/how-to-create-linq-to-sql-class.html#comments</comments>
		<pubDate>Mon, 26 Oct 2009 06:56:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Asp.net MVC]]></category>
		<category><![CDATA[CRUD operations]]></category>
		<category><![CDATA[asp.net Server Explorer]]></category>
		<category><![CDATA[create Linq to sql]]></category>
		<category><![CDATA[DataClassess]]></category>
		<category><![CDATA[dbml file]]></category>
		<category><![CDATA[Linq to sql classes]]></category>
		<category><![CDATA[Model and dbml file]]></category>
		<category><![CDATA[Server Explorer]]></category>

		<guid isPermaLink="false">http://www.codeforasp.net/?p=367</guid>
		<description><![CDATA[Part1: start MVC application
First Create Database Name  and tables
Note: Database Details
 
Servre name is lokesh
Create Database Purchase
Create table tblCustomers
CREATE TABLE tblCustomer(
[CustomerID] [int] NOT NULL,
[Name] [nvarchar](32) NOT NULL,
[Address] [nvarchar](64)  NOT NULL,
[EmailID] [nvarchar](32)  NOT NULL,
[PhoneNo] [nvarchar](16)  NOT NULL,
[State] [nvarchar](32)  NOT NULL,
[Country] [nvarchar](32)  NOT NULL,
CONSTRAINT [PK_tblCustomer] PRIMARY KEY CLUSTERED
(
[CustomerID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
Create Linq [...]]]></description>
		<wfw:commentRss>http://www.codeforasp.net/how-to-create-linq-to-sql-class.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
