ASP.NET MVC Exercises
SOOPRO Pathshala provides ASP.NET MVC Exercises
Day 1
ASP.NET MVC Day 1
SOOPRO Pathshala Exercises
Day 1
1. Write a program to create a method in mvc that return concatenation of first name and last name to browser.
2. Write a program to create a method in mvc that return vowels of your first name to browser.
3. Write a program to create a method in mvc that return consonants of your first name to browser.
4. Write a program to create a method that count total length of your first name and return to browser.
Day 2
ASP.NET MVC Day 2
SOOPRO Pathshala Exercises
Day 2
1. Write a program to return first four letters of your full name to web browser.
2. Write a program to return last three letters of your full name to web browser.
3. Write a program to return diff of length of first name and last name to web browser.
4. Write a program to return sum of any four digits numbers to web browser.
Day 3
ASP.NET MVC Day 3
SOOPRO Pathshala Exercises
Day 3
1. Pass id,name,gender,city salary to action method of mvc and return the concatenation result to web browser.
2. Pass three integer numbers to action method of mvc and return sum to web browser.
3. Pass two float numbers to action method of mvc and return average to web browser.
4. Try to print sum of four integer numbers using razor view engine in mvc.
Day 4
ASP.NET MVC Day 4
SOOPRO Pathshala Exercises
Day 4
1. Write a program to pass three long numbers to action method and return average to web browser.
2. Write a program to pass two integer to action method and return table of each numbers to web browser.
3. Write a program to pass two string value to action method and try to concatenate and return first two letters of first string and last two letter of second string to web browser.
4. Write a program to return reverse of your name to web browser.
5. Write a program to print add,sum,multiply and divide of three float numbers on razor view engine.
Day 5
ASP.NET MVC Day 5
SOOPRO Pathshala Exercises
Day 5
1. Strore id,name,gender,city and salary of employee in model class and print details of employee on view page.
2. Print month name in mvc using switch case (use razor view engine).
3. Print maximum of three integer number using ladder-if in mvc (use razor view engine).
Day 6
ASP.NET MVC Day 6
SOOPRO Pathshala Exercises
Day 6
1. Print table of maximum among two integer numbers on razor view engine.
2. Print factorial of minimum among two integer numbers on razor view engine.
3. Print sum of table of any integer number on razor view engine.
4. Try to print student details using model having id,name,gender, city and mobile no.
Day 7
ASP.NET MVC Day 7
SOOPRO Pathshala Exercises
Day 7
1. Pass your name from controller to view using ViewData.
2. Pass current date from controller to view using ViewData.
3. Pass list of colors from controller to view using ViewData.
4. Pass your list of favorite food from controller to view using ViewData.
5. pass details of Customer like id,name,gender,city, and amount from controller to Model and view using ViewData.
Day 8
ASP.NET MVC Day 8
SOOPRO Pathshala Exercises
Day 8
1. Create a model for book having bookid,bookname and bookprice. try to print book details on view page using viewData.
2. Reverse of four digit given numbers, store it in viewdata and print on view page.
3. Store reverse of your full name in viewdata and print it on viewpage.
4. create a model for customer having id,name,email,mobile,dob,address and city. try to print customer details on view page using viewdata.
Day 9
ASP.NET MVC Day 9
SOOPRO Pathshala Exercises
Day 9
1. Pass table of 1 to 5 in viewBag and print it on view page.
2. Pass prime or non prime of 2 to 20 in viewBag and print it on view page.
3. Pass factorial of 1 to 5 in viewBag and print it on view page.
4. Create customer model having id,name,gender,amount store it in viewBag and print it on view page.
Day 10
ASP.NET MVC Day 10
SOOPRO Pathshala Exercises
Day 10
1. Print list of favorite sport using TempData in next subsequent request.
2. Print list of favorite color using session in two different view pages.
3. Print sum of even numbers and odd numbers between 1 to 20 using viewData.
4. Print average of odd numbers of 1 to 20 using tempData.
5. Use keep() function with TempData to retain information for further call.
Day 11
ASP.NET MVC Day 11
SOOPRO Pathshala Exercises
Day 11
1.create menu driven program in MVC, on choice 1 short note on ViewData, on choice 2 print short note on ViewBag, on choice 3 print difference of ViewBag and and viewData, onn choice 4 print short notes asp.NET MVC
HINT : Take choice from url.
Day 12
ASP.NET MVC Day 12
SOOPRO Pathshala Exercises
Day 12
1. Create menu driven program in mvc, on choice 1 it should display list of fav colors, on choice 2 display list of fav sports, on choice 3 display list of fav foods, on choice 4 print short notes on session, on choice 5 print short notes on tempdata.
2. Print list of float numbers using tempdata in three different view pages.
3. Print list of chars using session in five different view pages.
Day 13
ASP.NET MVC Day 13
SOOPRO Pathshala Exercises
Day 13
1. Create a simple website having Home,About,Contact and Login page. try to link each page with action link.
2. Create a webpage in mvc to print list of integer number using inline html helper.
3. Create a webpage in mvc to print list of float numbers using inline html helper.
4. Create a webpage that contains textbox,radiobutton,checkbox,dropdownlist and password field.(use standard html helper)
Day 14
ASP.NET MVC Day 14
SOOPRO Pathshala Exercises
Day 14
1.create details form in mvc having Title,Name,Gender,Email,Mobile,Technology,Address,City and State.
2. Print even and odd of number list using inline helper.
3. Print prime and non-prime of number list using inline helper.
4. Print factorial of numbers list using inline helper.
Day 15
ASP.NET MVC Day 15
SOOPRO Pathshala Exercises
Day 15
1. Write a program to print sum of each table between 1 to 5 using inline helper in mvc.
2. Write a program to print square of even number between 1 to 10 using inline helper in mvc.
3. Write a program to print area of circle on choice 1,diameter of circle on choice 2, and circumference of circle on choice 3 using inline helper in mvc.
4. Write a program to print even sum and odd sum of 3 to 30 using inline helper.
Day 16
ASP.NET MVC Day 16
SOOPRO Pathshala Exercises
Day 16
1. Create strongly typed helper for id,name,gender,city and salary properties.
2. Create templated helper for id,name,gender,city and salary.
3. Create custom helper for image tag using extension method.
Day 17
ASP.NET MVC Day 17
SOOPRO Pathshala Exercises
Day 17
1. Write a program to print maximum of four float number using inline helper in mvc.
2. Write a program to print sum of maximum and minimum of two integer using inline helper.
3. Display your details like id,name,gender,city,salary and dob using strongly typed helper.
4. Display employee details like id,name,gender,city,salary and dob using strongly typed helper.
5. Display current date using templated helper.
Day 18
ASP.NET MVC Day 18
SOOPRO Pathshala Exercises
Day 18
1. Create traditional routing for displaying single student record on the basis of their id.
2. Create traditional routing for displaying all students.
3. Create attribute routing for displaying list of employees.
Day 19
ASP.NET MVC Day 19
SOOPRO Pathshala Exercises
Day 19
1. Print short notes on session in mvc on choice 1, print short notes on viewData on choice 2, print short notes on viewBag on choice 3, and print short notes on tempData on choice 4
2. Create templated helper for id,name,gender,city and amount of customer, try to print all details of customer using templated helper
3. Create image custom helper using extension method.
4. Create sample login form in mvc using strongly typed view.
Day 20
ASP.NET MVC Day 20
SOOPRO Pathshala Exercises
Day 20
1. Create a webform in mvc to add two integer numbers using strongly helper, take button and textbox to perform action
2. Create a webform that perform unit converter in mvc using strongly helper
3. Create a login form having admin and user authority, on admin login it should return admin dashboard and on user login it should return user dashboard
Day 21
ASP.NET MVC Day 21
SOOPRO Pathshala Exercises
Day 21
1. Print maximum of four numbers using strongly helper
2. Print minimum of four numbers using strongly helper
3. Print average of four float numbers using strongly helper
4. Print reverse of your first name using strongly helper
5. Print reverse of integer of four digit integer using strongly helper
Day 22
ASP.NET MVC Day 22
SOOPRO Pathshala Exercises
Day 22
1. Print concatenation of first and last letter of your first name using strongly helper
2. Print reverse of five digit number using strongly helper
3. Print value of textbox to different page in mvc
4. Print total length of textbox value in different page in mvc
Day 23
ASP.NET MVC Day 23
SOOPRO Pathshala Exercises
Day 23
1. Show employee details like id,name,title,email,mobile,address & city using code first approach in mvc.
Day 24
ASP.NET MVC Day 24
SOOPRO Pathshala Exercises
Day 24
1. Create student management system project in mvc.
Day 25
ASP.NET MVC Day 25
SOOPRO Pathshala Exercises
Day 25
1. Perform crud operation on employee table using database first approach.
Day 26
ASP.NET MVC Day 26
SOOPRO Pathshala Exercises
Day 26
1. Bind dropdownlist using database first approach.
2. Bind dropdownlistfor using database first approach.
3. Bind radiobutton using database first apporach.
4. Bind radiobuttonfor using database first apporach.
5. Bind listbox uisng database first approach.
6. Bind listboxfor uisng database first approach.
Day 27
ASP.NET MVC Day 27
SOOPRO Pathshala Exercises
Day 27
1. Print list of employee using database first approach.
Day 28
ASP.NET MVC Day 28
SOOPRO Pathshala Exercises
Day 28
1. Create details form having title, name, gender, email, mobile, technology, city and country.Try to print all the details using viewbag.
Day 29
ASP.NET MVC Day 29
SOOPRO Pathshala Exercises
Day 29
1. Write a program to return text file using file result return.
2. Write a program to return content using content result return.
3. Write a program to return js using js result return.
Day 30
ASP.NET MVC Day 30
SOOPRO Pathshala Exercises
Day 30
1. Wap to return empty result.
2. Wap to return content result.
3. Wap to return json result
Day 31
ASP.NET MVC Day 31
SOOPRO Pathshala Exercises
Day 31
1. Pass data from view to controller using request method.
2. Pass data from view to controller using form collection method.
3. Pass data from view to controller using strongly binding.
4. Pass data from view to controller using parameters.
Day 32
ASP.NET MVC Day 32
SOOPRO Pathshala Exercises
Day 32
1. Create a textfield in mvc that allow only numbers.
2. Create a textfield in mvc that allow only alphabets.
3. Create a textfield in mvc that do not allow special symbols like $,%, #, @ etc.
4. Create a textfield that allow only 10 letters minimum and 50 letters maximum.
5. Create a textfield in mvc that do not allow white space.
Day 33
ASP.NET MVC Day 33
SOOPRO Pathshala Exercises
Day 33
1. Create custom validation for not allowing neagative age in the field
Day 34
ASP.NET MVC Day 34
SOOPRO Pathshala Exercises
Day 34
1. Perform crud operations in mvc using ado.net, use model as business object.
Day 35
ASP.NET MVC Day 35
SOOPRO Pathshala Exercises
Day 35
1. CREATE CRUD APPLICATION USING MODEL AS BUSINESS OBJECTS... TRY TO CONNECT DATABASE USING ADO.NET
Day 36
ASP.NET MVC Day 36
SOOPRO Pathshala Exercises
Day 36
1. create crud application using model as business object, try to connect database using ado.net
Day 37
ASP.NET MVC Day 37
SOOPRO Pathshala Exercises
Day 37
1. Work on crud application once more using ado.net
Day 38
ASP.NET MVC Day 38
SOOPRO Pathshala Exercises
Day 38
1. Try to remove last letter of your first name by user input in mvc.
2. Try to remove first letter of your first name by user input in mvc.
3. Try to remove first and last letters of your first name by user input in mvc.
4.try to concatenate first and last letters of your first name and print it using viewdata on view page by user input.
Day 39
ASP.NET MVC Day 39
SOOPRO Pathshala Exercises
Day 39
1. Create login and logout using forms authentication in mvc
Day 40
ASP.NET MVC Day 40
SOOPRO Pathshala Exercises
Day 40
1. Bind dropdownlistfor using database first approach.
2. Bind listboxfor using database first approach.
3. Bind radiobuttonfor using database first approach.
Day 41
ASP.NET MVC Day 41
SOOPRO Pathshala Exercises
Day 41
1. Bind dropdownlistfor using database first approach.
2. Bind radiobuttonfor using database first approach.
3. Bind listboxfor using database first approach.
Day 42
ASP.NET MVC Day 42
SOOPRO Pathshala Exercises
Day 42
1. Wap to return js in mvc.
2. Wap to return content in mvc.
3. Wap to return file in mvc.
4. Wap to return json in mvc.
Day 43
ASP.NET MVC Day 43
SOOPRO Pathshala Exercises
Day 43
1. Write a program to calculate area & perimeter of rectangle and circle.take length,breadth,radius from user.
Day 44
ASP.NET MVC Day 44
SOOPRO Pathshala Exercises
Day 44
1. Write a program to obtain sum of the first and last digit of a four digit number. take number from user.
2. If the total selling price of 15 items and the total profit earned on them is input by the user. write a program to calculate cost price of 1 item.
Day 45
ASP.NET MVC Day 45
SOOPRO Pathshala Exercises
Day 45
1.Write a program which initialize earning of an employee. The program should calculate the income tax to be paid by the employee as per the criteria given below.
subrate itrate
upto rs 50000 nill
upto rs 60000 10%
upto rs 150000 20%
upto rs 200000 30%
upto rs 500000 40%