DOT NET SE AD4 MCQ


hello friends if you are looking for DOT NET SE AD4 objective type questions | DOT NET SE AD4 MCQ with answers | DOT NET SE AD4 Multiple choice questions with answers | DOT NET SE AD4 Accenture Dumps


1.You want to create a service for a project. The clients for this service will be browsers and mobile
devices. The communication protocol will be only HTTP. You also want to transfer the data between
your service and clients and efficiently.
Which of the following is the best option for this requirement?
Ans. Web API
2.Which of the following statements is/are TRUE about ASP.NET MVC
a)ASP.NET MVC provides better testability.
b)ASP.NET MVC supports ViewState.
Ans. Only a
3. Consider the following conversations:
Patrick : ASP.NET Web API supports only XML response, does not supports JSON
Ashu : ASP.NET Web API supports only JSON response, does not supports XML.
What is your observation on this conervsation?
Ans. Both are Incorrect.
4. Sam has written below code in Api controller to fetch all the employess list
Public JsonResult<List<Employee>> GetAllEmployeeList()
{
List<Employee>IstEmpList = Repo_Class.GetAllEmployeeList(); //Line1
//line2
return empListReturn; //line3
}
Choose the correct statement to be added at line 2 to complete the program.
Ans.
5.Which of the following classes is considered as base class for results with respect to ASP.NET MVC?
Ans. ActionResult
6.In which of the following file the default route is registered for MVC?
Ans. RouteConfig.cs

7.Consider the following code written in Home Controller :
Public ActionResult Product()
{
Viewbag.Message = “Your product page.”;
return View();
}
Which of the following is the correct way of displaying the Message stored in ViewBag in view?
Ans. <p> welcome to @ViewBag Message </p> || ViewData (Doubt)
8. Consider the following code
Public ViewResultDisplay()
{
Return /*missing code*/
}
Fill the missing code to be returned ?
Ans. View()
9.Consider Login page having two textboxes and a Login button.
You need to ensure that when Login button is clicked validations to control must be done so that user
must enter data. In ASP.NET MVC.
So where should validation logic must be written?
Ans. Model
10.Which of the following Action result can be used to render the View.
Ans. ActionResult , ViewResult
11.The path of the Layout view file to be used by your application is specified in the _______ file.
Ans. ViewStart.cshtml
12. You have created a multi layer application. The Data Access layer uses Entity Framework and has an
entity class called Product. The presentation layer uses MVC and the MVC application has a model class
called ProductModel. You want to write a code to update product information in the database. The
update view must first display the details of the product which has to be updated, based on the product
id. Which of the following HTTP GET action methods can be best used for this purpose.
Ans. Public Actionresult E..(Product Model)

13. Which of the following is the correct way of Invoking the web api:
Public class ProductController : ApiController
{
[HttpGet]
Public string ViewAllProducts()
{
String prod = “mobile”;
Return prod;
}
Ans. http://localhost:64270/api/productView....
14. Predict the output of the following code snippet of ASP.NET Web API
Note: repos is a valid data access layers repository class object
GetAllBooks() returns list of books
Public List<Book> GetAllBooks()
{
Var books = repo.getAllBooks();
Return books;
}
Ans. Can expose either xml or json , it depends
15.Consider the following statements.
a) Native Templating is used to connect knockout to a third party template group.
b) Native templating is used for applying if, foreach with and other context flow bindings.
Ans. Only b

16.Consider the following MVC Application URL
http://localhost:3020/Product/ViewProduct/500
Which of the following controller and ActionMethod exactly matches the signature for the above URL?
Ans. public class ProductController : Controller
{
public ActionResult ViewProduct(string id)
{
return View();
}
}
17.Consider the following WEB API Controller
Public class ProductsController : ApiConntroller
{
Public List<Product>getAllproducts(){}
Public Product GetProductById(int id){}
}
Which of the following URI’s can be used to invoke the GetProductById action ?
Ans. Api/products/4
18.The content negotiation depends on _______ format of client application?
Ans. Content handler || Request header (doubt)
19.You have created an ASP.NET MVC application with a model class called EmployeeModel.This class
has a property called Salary. You want this property to be displayed as “Earnings” in a view. Which of the
following options can be used to achieve this?
Ans. [Display(Name=”Earnings”)]
20.How to transfer data from controller to view in MVC?
Ans. All of the given choices
21.Which of the following is responsible for displaying the data contained in Model?
Ans. View

22.__________ activates the knockout?
Ans. Ko.applyBindings()
23.When ________ is updated knockout updates and refresh the UI automatically.
Ans. Observable
24.The content negotiation depends on ______ format of client application.
Ans. Request header
25. You are working on an ASP.NET MVC application. Your project requires that every view page uses a
common design with a uniform header , footer and side bars. This common layout has been created and
stored in the views/Shared folder and named as “Master.cshtml”. How will you ensure this design is
applied to all view pages in your project?
Ans. In the _ViewStart.cshtml file,set the Layout
26.<!—Block 1
</script>
<body>
<ul>
<li>Apple</li>
<li>Motorola</li>
.
</ul>
</body>
Choose most appropriate option
Ans. $(‘li’).each(function (index) {
Alert($(this).text());
});
27.Which of the following statement is FALSE about Model Validation?
Ans. Model validation concept is not available

28.the status of the server like success(200)
Ans. Status Code

29. Consider the following code.
<!DOCTYPE html>
<html>
<head>
<meta charset=”utf-8”>
<script src=”-/Scripts/jquery-3.3.1.min.js”></script>
</head>
<body>
<div>
<p id=”hdc”>Welcome to Accenture HDC</p> <!—LINE 1 >
<p>Welcome to Accenture BDC </P><!—LINE 2
</div>
<script>
$(“#hdc”).css({“background-color”:”red”});
</script>
</body></html>
Ans. LINE 1 WILL BE DISPLAYED WITH BACKGROUND COLOR AS ……

30. method is used for performing create operation ?
Ans. POST ….

36.Consider the code written in RouterConfig.cs file and choose the appropriate options below
Public static void RegisterRouter(RouteCollection routes)
{
routes.IgnoreRoute(“(resource)axd/{“pathinfo}”);
routes MapRoute{
name: “Default”,
url: “{controller}/{action}/{id}”,
default: new { controller = “Home”, action=”Index”,id=UrlParameter.Optional}
};
}
The application has HomeController with action method Index created.
Which of the below mentioned URL will generate HTTP 404-Resource cannot be found error?
Ans. http://localhost.54450/Home/Index/200

38. Which of the following sign can be used to specify that you are using jquery
a) $
b) #
c) jQuery
Ans. $

1.You want to create a service for a project. The clients for this service will be browsers and mobile
devices. The communication protocol will be only HTTP. You also want to transfer the data between
your service and clients and efficiently.
Which of the following is the best option for this requirement?
Ans. Web API
2.Which of the following statements is/are TRUE about ASP.NET MVC
a)ASP.NET MVC provides better testability.
b)ASP.NET MVC supports ViewState.
Ans. Only a
3. Consider the following conversations:
Patrick : ASP.NET Web API supports only XML response, does not supports JSON
Ashu : ASP.NET Web API supports only JSON response, does not supports XML.
What is your observation on this conervsation?
Ans. Both are Incorrect.
4. Sam has written below code in Api controller to fetch all the employess list
Public JsonResult<List<Employee>> GetAllEmployeeList()
{
List<Employee>IstEmpList = Repo_Class.GetAllEmployeeList(); //Line1
//line2
return empListReturn; //line3
}
Choose the correct statement to be added at line 2 to complete the program.
Ans.
5.Which of the following classes is considered as base class for results with respect to ASP.NET MVC?
Ans. ActionResult
6.In which of the following file the default route is registered for MVC?
Ans. RouteConfig.cs

7.Consider the following code written in Home Controller :
Public ActionResult Product()

{
Viewbag.Message = “Your product page.”;
return View();
}
Which of the following is the correct way of displaying the Message stored in ViewBag in view?
Ans. <p> welcome to @ViewBag Message </p>
8. Consider the following code
Public ViewResultDisplay()
{
Return /missing code/
}
Fill the missing code to be returned ?
Ans. View()
9.Consider Login page having two textboxes and a Login button.
You need to ensure that when Login button is clicked validations to control must be done so that user
must enter data. In ASP.NET MVC.
So where should validation logic must be written?
Ans. Model
10.Which of the following Action result can be used to render the View.
Ans. ActionResult , ViewResult
11.The path of the Layout view file to be used by your application is specified in the ___ file.
Ans. _ViewStart.cshtml
12. You have created a multi layer application. The Data Access layer uses Entity Framework and has an
entity class called Product. The presentation layer uses MVC and the MVC application has a model class
called ProductModel. You want to write a code to update product information in the database. The
update view must first display the details of the product which has to be updated, based on the product
id. Which of the following HTTP GET action methods can be best used for this purpose.
Ans. Public Actionresult E..(Product Model)
13. Which of the following is the correct way of Invoking the web api:
Public class ProductController : ApiController
{
[HttpGet]

Public string ViewAllProducts()
{
String prod = “mobile”;
Return prod;
}
Ans. http://localhost:64270/api/productView....
14. Predict the output of the following code snippet of ASP.NET Web API
Note: repos is a valid data access layers repository class object
GetAllBooks() returns list of books
Public List<Book> GetAllBooks()
{
Var books = repo.getAllBooks();
Return books;
}
Ans. Can expose either xml or json , it depends
15.Consider the following statements.
a) Native Templating is used to connect knockout to a third party template group.
b) Native templating is used for applying if, foreach with and other context flow bindings.
Ans. Only b

16.Consider the following MVC Application URL
http://localhost:3020/Product/ViewProduct/500
Which of the following controller and ActionMethod exactly matches the signature for the above URL?
Ans. public class ProductController : Controller
{

Public ActionResult ViewProduct(string id)
{
return View();
}
}
17.Consider the following WEB API Controller
Public class ProductsController : ApiConntroller
{
Public List<Product>getAllproducts(){}
Public Product GetProductById(int id){}
}
Which of the following URI’s can be used to invoke the GetProductById action ?
Ans. Api/products/4
18.The content negotiation depends on ___ format of client application?
Ans. Request header
19.You have created an ASP.NET MVC application with a model class called EmployeeModel.This class
has a property called Salary. You want this property to be displayed as “Earnings” in a view. Which of the
following options can be used to achieve this?
Ans. [Display(Name=”Earnings”)]
20.How to transfer data from controller to view in MVC?
Ans. ViewBag, ViewData & TempData
21.Which of the following is responsible for displaying the data contained in Model?
Ans. View

22.____ activates the knockout?
Ans. Ko.applyBindings()
23.When ____ is updated knockout updates and refresh the UI automatically.
Ans. Observable
24.The content negotiation depends on __ format of client application.
Ans. Request header

25. You are working on an ASP.NET MVC application. Your project requires that every view page uses a
common design with a uniform header , footer and side bars. This common layout has been created and
stored in the views/Shared folder and named as “Master.cshtml”. How will you ensure this design is
applied to all view pages in your project?
Ans. In the _ViewStart.cshtml file,set the Layout
26.<!—Block 1
</script>
<body>
<ul>
<li>Apple</li>
<li>Motorola</li>
.
</ul>
</body>
Choose most appropriate option
Ans. $(‘li’).each(function (index) {
Alert($(this).text());
});
27.Which of the following statement is FALSE about Model Validation?
Ans. Model validation concept is not available

28.the status of the server like success(200)
Ans. Status Code

29. Consider the following code.
<!DOCTYPE html>
<html>
<head>
<meta charset=”utf-8”>
<script src=”-/Scripts/jquery-3.3.1.min.js”></script>
</head>

<body>
<div>
<p id=”hdc”>Welcome to Accenture HDC</p> <!—LINE 1 >
<p>Welcome to Accenture BDC </P><!—LINE 2
</div>
<script>
$(“#hdc”).css({“background-color”:”red”});
</script>
</body></html>
Ans. LINE 1 WILL BE DISPLAYED WITH BACKGROUND COLOR AS ……

30. method is used for performing create operation ?
Ans. POST ….

35.Which of the following State Management Technique cannot be used to pass data from controller to
controller?
Ans. ViewBag,ViewData

1.You want to create a service for a project. The clients for this service will be browsers and mobile
devices. The communication protocol will be only HTTP. You also want to transfer the data between
your service and clients and efficiently.
Which of the following is the best option for this requirement?
Ans. Web API

2.Which of the following statements is/are TRUE about ASP.NET MVC
a)ASP.NET MVC provides better testability.
b)ASP.NET MVC supports ViewState.
Ans. Only a

3. Consider the following conversations:
Patrick : ASP.NET Web API supports only XML response, does not supports JSON
Ashu : ASP.NET Web API supports only JSON response, does not supports XML.
What is your observation on this conervsation?
Ans. Both are Incorrect.

5.Which of the following classes is considered as base class for results with respect to ASP.NET MVC?
Ans. ActionResult

6.In which of the following file the default route is registered for MVC?
Ans. RouteConfig.cs

7.Consider the following code written in Home Controller :
Public ActionResult Product()
{
Viewbag.Message = “Your product page.”;

return View();
}
Which of the following is the correct way of displaying the Message stored in ViewBag in view?
Ans. <p> welcome to @ViewBag Message </p> || ViewData (Doubt)
8. Consider the following code
Public ViewResultDisplay()
{
Return /*missing code*/
}
Fill the missing code to be returned ?
Ans. View()

9.Consider Login page having two textboxes and a Login button.
You need to ensure that when Login button is clicked validations to control must be done so that user
must enter data. In ASP.NET MVC.
So where should validation logic must be written?
Ans. Model

10.Which of the following Action result can be used to render the View.
Ans. ActionResult , ViewResult

11.The path of the Layout view file to be used by your application is specified in the _______ file.
Ans. ViewStart.cshtml

12. You have created a multi layer application. The Data Access layer uses Entity Framework and has an
entity class called Product. The presentation layer uses MVC and the MVC application has a model class
called ProductModel. You want to write a code to update product information in the database. The
update view must first display the details of the product which has to be updated, based on the product
id. Which of the following HTTP GET action methods can be best used for this purpose.
Ans. Public Actionresult E..(Product Model)

13. Which of the following is the correct way of Invoking the web api:
Public class ProductController : ApiController
{
[HttpGet]
Public string ViewAllProducts()
{
String prod = “mobile”;
Return prod;
}
Ans. http://localhost:64270/api/productView....

14. Predict the output of the following code snippet of ASP.NET Web API
Note: repos is a valid data access layers repository class object
GetAllBooks() returns list of books
Public List<Book> GetAllBooks()
{
Var books = repo.getAllBooks();
Return books;
}
Ans. Can expose either xml or json , it depends

15.Consider the following statements.
a) Native Templating is used to connect knockout to a third party template group.
b) Native templating is used for applying if, foreach with and other context flow bindings.
Ans. Only b

16.Consider the following MVC Application URL
http://localhost:3020/Product/ViewProduct/500
Which of the following controller and ActionMethod exactly matches the signature for the above URL?
Ans. public class ProductController : Controller
{
public ActionResult ViewProduct(string id)
{
return View();
}
}
17.Consider the following WEB API Controller
Public class ProductsController : ApiConntroller
{
Public List<Product>getAllproducts(){}
Public Product GetProductById(int id){}
}
Which of the following URI’s can be used to invoke the GetProductById action ?
Ans. Api/products/4

18.The content negotiation depends on _______ format of client application?
Ans. Content handler || Request header (doubt)

19.You have created an ASP.NET MVC application with a model class called EmployeeModel.This class
has a property called Salary. You want this property to be displayed as “Earnings” in a view. Which of the
following options can be used to achieve this?
Ans. [Display(Name=”Earnings”)]

20.How to transfer data from controller to view in MVC?
Ans. All of the given choices

21.Which of the following is responsible for displaying the data contained in Model?
Ans. View

22.__________ activates the knockout?
Ans. Ko.applyBindings()

23.When ________ is updated knockout updates and refresh the UI automatically.
Ans. Observable

24.The content negotiation depends on ______ format of client application.
Ans. Request header

25. You are working on an ASP.NET MVC application. Your project requires that every view page uses a
common design with a uniform header , footer and side bars. This common layout has been created and
stored in the views/Shared folder and named as “Master.cshtml”. How will you ensure this design is
applied to all view pages in your project?
Ans. In the _ViewStart.cshtml file,set the Layout

26.<!—Block 1→
</script>
<body>

<ul>
<li>Apple</li>
<li>Motorola</li>
.
</ul>
</body>
Choose most appropriate option
Ans. $(‘li’).each(function (index) {
Alert($(this).text());
});

27.Which of the following statement is FALSE about Model Validation?
Ans. Model validation concept is not available

28.the status of the server like success(200)
Ans. Status Code

29. Consider the following code.
<!DOCTYPE html>
<html>
<head>
<meta charset=”utf-8”>
<script src=”-/Scripts/jquery-3.3.1.min.js”></script>
</head>
<body>
<div>
<p id=”hdc”>Welcome to Accenture HDC</p> <!—LINE 1 >
<p>Welcome to Accenture BDC </P><!—LINE 2→

</div>
<script>
$(“#hdc”).css({“background-color”:”red”});
</script>
</body></html>
Ans. LINE 1 WILL BE DISPLAYED WITH BACKGROUND COLOR AS ……

30. method is used for performing create operation ?
Ans. POST ….

36.Consider the code written in RouterConfig.cs file and choose the appropriate options below
Public static void RegisterRouter(RouteCollection routes)
{
routes.IgnoreRoute(“(resource)axd/{“pathinfo}”);
routes MapRoute{
name: “Default”,
url: “{controller}/{action}/{id}”,
default: new { controller = “Home”, action=”Index”,id=UrlParameter.Optional}
};
}
The application has HomeController with action method Index created.
Which of the below mentioned URL will generate HTTP 404-Resource cannot be found error?
Ans. http://localhost.54450/Home/Index/200

38. Which of the following sign can be used to specify that you are using jquery
a) $
b) #

c) jQuery
Ans. $

40. You want to apply the following validations on a password field.
a. The password is mandatory
b. The password field must be marked when data is entered.
Which of the following annotations will fulfill the requirements
Ans. RequiredPassword

1. You want to create a service for a project. The clients for this service will be browsers and
mobile devices, Ans-Use WEB API
2. Which of the following statement is/are true about asp.net MVC: Ans- only a (provides better
testability)

3.

Consider the following conversations: Patrik & Ashu : Ans- Both are incorrect

4. Which of the following classes is considered as base class for results with respect to ASP.NET
MVC, Ans- Action

5. In which of the following file the default route is registered for MVC? Ans-RoleConfig.cs
6. Consider the following code written in Home controller: public ActionResult Product() {
ViewBag.Message=”Your product page”; result View(); } Ans- <p> welcome to
@ViewBag.Message <p>

7. Consider the following code public ViewResult Display() { return /* missing code*/ } Ans – View()
8. Consider login page having two textboxes and a login button. Ans- Model

9. Consider the below URL and assume the default…………. Identify the Action method? AnsLongest Ans
10. Which of the following action result can be used to render the view Ans- ActionResult &
ViewResult

11. The path of the layout view file to be used by your application is specified in the __________
file. Ans-ViewStart.cshtml
12. You have created a multi layer application. The data access layer uses entity framework and has
an entity class called Product……………………….. Which of the following HTTP GET action method
can be best used for this purpose ? Ans- public ActionResult Get(int) shortest ans.

13. Used for performing create operation Ans- POST
14. You want to apply the following validation on a password field. Ans-Request Password

15. Predict the output of the following code snippet of ASP>NET Web API Note: repo is a valid data
access layer’s repository class object GetAllBooks() Ans: Can expose
16. Indicates the status of the server like success(200) Ans-Sta
17. Consider the following WEB API controller: public List<Product>GetProducts() {} public Product
GetProductById(int id) {} } Which of the following URI’s can be used to invoke the
GetProductById action ? Ans: api/products/4

18. The content negotiation depends on ___________ format of client application Ans- content
header
19. You have created an ASP.NET MVC application with a model class EmployeeModel. This class
has a property called Salary. You want this property to be displayed as “Earning ” in a view.
Which of the following options cab be used to achive this ? Ans- {Display(Name=”Earning”)}

20. How to transfer data from controller to view in MVC? Ans- All
21. Which of the following is responsible for the displaying the data contained in model ? Ans-View

22. __________ activates the knockout ? Ans-Ko.applyBindings{}
23. When _____________ is updated, knockout updates and refresh the UI ? Ans-Observable

1.You want to create a service for a project. The clients for this service will be browsers and mobile
devices. The communication protocol will be only HTTP. You also want to transfer the data between
your service and clients and efficiently.
Which of the following is the best option for this requirement?
Ans. Web API
2.Which of the following statements is/are TRUE about ASP.NET MVC
a)ASP.NET MVC provides better testability.
b)ASP.NET MVC supports ViewState.
Ans. Only a
3. Consider the following conversations:
Patrick : ASP.NET Web API supports only XML response, does not supports JSON
Ashu : ASP.NET Web API supports only JSON response, does not supports XML.
What is your observation on this conervsation?
Ans. Both are Incorrect.
4. Sam has written below code in Api controller to fetch all the employess list
Public JsonResult<List<Employee>> GetAllEmployeeList()
{
List<Employee>IstEmpList = Repo_Class.GetAllEmployeeList(); //Line1
//line2
return empListReturn; //line3
}
Choose the correct statement to be added at line 2 to complete the program.
Ans.
5.Which of the following classes is considered as base class for results with respect to ASP.NET MVC?
Ans. ActionResult
6.In which of the following file the default route is registered for MVC?
Ans. RouteConfig.cs

7.Consider the following code written in Home Controller :
Public ActionResult Product()
{
Viewbag.Message = “Your product page.”;
return View();
}
Which of the following is the correct way of displaying the Message stored in ViewBag in view?
Ans. <p> welcome to @ViewBag Message </p> || ViewData (Doubt)
8. Consider the following code
Public ViewResultDisplay()
{
Return /*missing code*/
}
Fill the missing code to be returned ?
Ans. View()
9.Consider Login page having two textboxes and a Login button.
You need to ensure that when Login button is clicked validations to control must be done so that user
must enter data. In ASP.NET MVC.
So where should validation logic must be written?
Ans. Model
10.Which of the following Action result can be used to render the View.
Ans. ActionResult , ViewResult
11.The path of the Layout view file to be used by your application is specified in the _______ file.
Ans. ViewStart.cshtml
12. You have created a multi layer application. The Data Access layer uses Entity Framework and has an
entity class called Product. The presentation layer uses MVC and the MVC application has a model class
called ProductModel. You want to write a code to update product information in the database. The
update view must first display the details of the product which has to be updated, based on the product
id. Which of the following HTTP GET action methods can be best used for this purpose.
Ans. Public Actionresult E..(Product Model)

13. Which of the following is the correct way of Invoking the web api:
Public class ProductController : ApiController
{
[HttpGet]
Public string ViewAllProducts()
{
String prod = “mobile”;
Return prod;
}
Ans. http://localhost:64270/api/productView....
14. Predict the output of the following code snippet of ASP.NET Web API
Note: repos is a valid data access layers repository class object
GetAllBooks() returns list of books
Public List<Book> GetAllBooks()
{
Var books = repo.getAllBooks();
Return books;
}
Ans. Can expose either xml or json , it depends
15.Consider the following statements.
a) Native Templating is used to connect knockout to a third party template group.
b) Native templating is used for applying if, foreach with and other context flow bindings.
Ans. Only b

16.Consider the following MVC Application URL
http://localhost:3020/Product/ViewProduct/500
Which of the following controller and ActionMethod exactly matches the signature for the above URL?
Ans. public class ProductController : Controller
{
public ActionResult ViewProduct(string id)
{
return View();
}
}
17.Consider the following WEB API Controller
Public class ProductsController : ApiConntroller
{
Public List<Product>getAllproducts(){}
Public Product GetProductById(int id){}
}
Which of the following URI’s can be used to invoke the GetProductById action ?
Ans. Api/products/4
18.The content negotiation depends on _______ format of client application?
Ans. Content handler || Request header (doubt)
19.You have created an ASP.NET MVC application with a model class called EmployeeModel.This class
has a property called Salary. You want this property to be displayed as “Earnings” in a view. Which of the
following options can be used to achieve this?
Ans. [Display(Name=”Earnings”)]
20.How to transfer data from controller to view in MVC?
Ans. All of the given choices
21.Which of the following is responsible for displaying the data contained in Model?
Ans. View

22.__________ activates the knockout?
Ans. Ko.applyBindings()
23.When ________ is updated knockout updates and refresh the UI automatically.
Ans. Observable
24.The content negotiation depends on ______ format of client application.
Ans. Request header
25. You are working on an ASP.NET MVC application. Your project requires that every view page uses a
common design with a uniform header , footer and side bars. This common layout has been created and
stored in the views/Shared folder and named as “Master.cshtml”. How will you ensure this design is
applied to all view pages in your project?
Ans. In the _ViewStart.cshtml file,set the Layout
26.<!—Block 1→
</script>
<body>
<ul>
<li>Apple</li>
<li>Motorola</li>
.
</ul>
</body>
Choose most appropriate option
Ans. $(‘li’).each(function (index) {
Alert($(this).text());
});
27.Which of the following statement is FALSE about Model Validation?
Ans. Model validation concept is not available

28.the status of the server like success(200)
Ans. Status Code

29. Consider the following code.
<!DOCTYPE html>
<html>
<head>
<meta charset=”utf-8”>
<script src=”-/Scripts/jquery-3.3.1.min.js”></script>
</head>
<body>
<div>
<p id=”hdc”>Welcome to Accenture HDC</p> <!—LINE 1 >
<p>Welcome to Accenture BDC </P><!—LINE 2→
</div>
<script>
$(“#hdc”).css({“background-color”:”red”});
</script>
</body></html>
Ans. LINE 1 WILL BE DISPLAYED WITH BACKGROUND COLOR AS ……


1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *