Posts

Showing posts from November, 2016

mvc pattern and asp.net mvc

MVC Pattern MVC stands for Model View Controller, it is a software development pattern that separates development concerns meaning all team members can independently work on his own. View: View contain s uiu your html tag which were rendered to browser. Model: Model is where all your business ASP.NET and MVC Framework

OptimisticVerificationException (Row not found: GenericOID@) in Artificial types.

possible cause of generating this problem. if you have two tables having parent child relationship e.g Table1: Student (studentId, name) Table2: Courses (courseId, name, studentId) in a scenario where you want operator to open student record in edit mode i.e showing his name + his enrolled course suppose initially two courses were enrolled but now operator wants to enroll 5 more courses, which will make it 7 courses all together. upon update you are following strategy as first remove all previous courses

multiple ways to call a partial view in asp.net mvc 5

there are scenarios where you want to minimize redundancy and fasten up productivity, hence partial views play role over here. 1st Approach suppose you are creating a user mgt application where you'll first add user with four input fields, then will show them in index page, if operator want to edit any user record, that record will get displayed in edit mode (same four fields) then upon update record gets saved in db. in this scenario either you have to create two different views create and update containing same fields OR you just make a template / partial view and call it in both views resulting in mitigating redundancy, increasing productivity, also if you want to make some changes, you dont need to update both views i.e (create / update) you'll only need to update one partial view. create.cshtml @model Model.User Html.BeginForm() { @RenderPartial() } update.cshtml partialuser.cshtml 2nd Approach what I see in your controller is a mix of methods. I

how to reset your visual studio settings

if your vs (any version) start hanging out / or showing error like 'unable to copy .exe from obj to bin' then it means you need to reset the developer environment settings For visual studio 2010, devenv was in: C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE - run command line as administrator - goto specified path or as per your installation directory - write command devenv /ResetSettings