Thursday 3 May 2012

Insert value to database in mvc2 pattern


Here i had written code in model.Its developer wish to write the code in controller or separate class file.

In Controller

            

Here Test is class name which is in model.Also in model we create one method name test.In controller we just getting value and pass it to the method and inserting value to database.

In views nothing is changed.

for your reference just posting that also(as same as above samples).




            
And the output is:



No comments:

Post a Comment