Q Which of the following is not a member of ADODBCommand object?
Ans. ExecuteStream
Q The purpose of
page.EnableEventValidation=”true” is that?
It validates that a control
event originated from the user interface that was rendered by that control
Q Which of the following is not a valid
option in OutputCache directive?
VaryByUserAgent
Q Where are routes registered in ASP .NET
MVC application?
Global.ascx
Q Declaring more than one pag e directives
on an ASP.NET page will result in
A
compile time error
Q What is the middleware in ASP .Net Core/
Open web interface for .NET (OWIN)
Software
components that are associated into an application pipeline to handle requests
and responses
Q Which of these data source controls do
not implement caching?
LinqDataSource
Q how could you traditionally consume an
ASMX web service from your application?
2(Create an HttpService and
connect using Get(URL).) and 3(Generate
a proxy by selecting Add A Service Reference in Visual Studio.) both
Q how do you ensure that textbox input is
a valid date value?
Use a
customvalidator with server-side or client-side code to validate date
Q let’s suppose, on an .ASPX page, we have
two separate data entry forms with submit buttons. How can we ensure that
submitting the first form does not validate any controls in second form, and
vice versa?
Assign
two different validation groups to both forms and their controls
Q Which kind of data can be stored in
ViewState?
View state can only store serializable
object
View state can store anything
View state can store only strings
None of
the above
Q Let’s suppose a SQLDataSource and a
GridView are configured with SELECT and UPDATE queries; and GridView has
AutoGenerateEditButton=True, how can we ensure data concurrency is an efficient
way?
Add a
conflict detection attribute to SqlDataSource
Q you are modifying an existing ASP .NET
MVC web application to incorporate mobile access. What should you ensure that
mobile devices view mobile-only pages? (choose all that apply )
1(Run the Install-Package
jQuery.Mobile.MVC command using the Package Manager console.) and 4(Create additional views with .Mobile, such as Index.Mobile.cshtml
as well as a _Layout.Mobile.cshtml master layout page.) both
Q what data types do a Range validator
support?
All of
the above
Q The maximum number of content
placeholders in a master page is?
Unlimited
Q As you design a session-less state
management system, what do you need to ensure that your application manages?
1 and 4
both
Explanation
Your application needs to manage whatever information
might be re-quired to access the state management system. Your application
needs to manage the passing of the identifier between requests.
Q Code behind classes are partial classes
because?
Part of
the code behind is implemented by ASP .Net framework and contains all the
controls declared on the page
Q Which page event is most suitable to
programmatically change the master page?
PreInit
Q you are developing an asp .NET MVC 2
application. A view contains a form that allows users to submit their first
name. You need to display that value that is submitted, and you must ensure
that your code avoids cross site scripting. Which code segment should you use?
<%:Model.FirstName%>
Q In your ASP .NET 2.0 web application you
want to display an image that is selected from a collection of images. What
approach will you use to implement this?
Use the AdServer control and create an XML file with configuration of
the control.
Q ______element in the
web.config file to run code using the permissions of a specific user?
< identity> element
Q If I’m developing an
application that must accommodate multiple security levels though secure login
and my ASP.NET web application is spanned across three web-servers (using
round-robin load balancing) what would be the best approach to maintain
login-in state for the users?
Maintain the login state security through a database.
Q What is the lifespan for
items stored in viewstate.
Exists for the Life of the current page
Q let's suppose the
web.config has defined a theme for the application, but theming is disabled in
the master page file like this:
<%@ Master
EnableTheming=”False” %>
Which of the following
statement will be true?
A control can enable theme for itself but it cannot be enabled for the
entire content page.
Q declaring more than one
form tags with runat="server" on an ASPX page will result in?
A run-time error
Q if you have view with
@page directive to inherit from viewpage then your view is _____?
Strongly Typed View
Q which of these tags equals
response.write?
<%= %>
Q If I’m developing an application that must accommodate multiple
security levels though secure login and my ASP.NET web application is spanned across
three web-servers (using round-robin load balancing) what would be the best
approach to maintain login-in state for the users?
Maintain
the login state security through a database.
Q In order to prevent a browser from
caching a page, which of these statements should be written?
Response.Cache.SetNoStore();
Q Layout.cshtml and Site.Master are the two default template pages
in ASP.NET MVC. Which of the following scenarios would best be solved using a
single layout or master template? (Choose all that apply.)
1 and 3 both
Q Why
should you create a custom role provider?
To use a data source not regularly
supported
To use a database design different than
.Net provides
Q Asp
.Net page unload event is raised when?
The page and its controls have been rendered
Q
Which of the following is true about ASP.NET/URL Rewriting in a development
environment?
One URL rewrite of
many HTTP module for
ASP.NET - this works very well if you only want rewritting on your ASP.NET
pages. You can also infact map other filetypes since the IIS 7 changes
A URL rewriter ISAPI extension for
IIS - faster than using the ASP.NET and more familiar to you if you're use to
mod_rewrite.
All of above
Q What
is the best way to intercept every request for an image on your site and ensure
that a watermark is added to the image?
A custom HTTP handler configured to
serve .png and .jpg files
Q what
is/are the predefined traceListener(s) in Asp.Net?
-
TextWriterTraceListener
- EventLogTraceListener
- DefaultTraceListener
- All the above 1, 2,3
- EventLogTraceListener
- DefaultTraceListener
- All the above 1, 2,3
Q What
is the sequence in which Page_Load events are executed?
Page, Master page, User Control
Q User
with which role(s) will be able to use TestController defined below?
[Authorize(Roles
= " Admin ")]
[Authorize(Roles
= " Group")]
public
class TestController: Controller
{
}
With “Admin” and “Group” roles
Q
Which of the following is not a valid type of parameter for a SqlDatasource?
LocalStorageParameter
Q
Which of the following is true about connecting SQL Azure database in
conventional way?
Yes to connect to SQL Azure you just need
the right connection sting (and to set SQL azure firewall to allow connections
from your IP)
Q you
are modifying an ASP.Net MVC application and you have created a new master page
named _layout.WindowsPhone.cshtml. you want to use that layout in a view. Which
code segment do you use?
s
Layout =
“~/views/Shared/_layout.WindowsPhone.cshtml”;
Q We
have defined one page_load event in aspx page and the same is defined in code
behind page then which event will fire first?
page_load event in code-behind
Q how
is asp .net different from classic asp?
Scripting
is separated from the HTML. Code is interpreted separately
Code is
separated from the HTML and interpreted code is interpreted separately.
Scripting is separated from the HTML, Code
is compiled as a DLL, the DLL can be executed on the server.
All of
above
Q Which of the following statements is true?
Custom controls are displayed correctly
in VS.Net Designer
Q Which of the following is not a column type a
GridView?
Custom field
Q which
of these controls can be declared inside a TemplateField of a GridView control?
DropDownList
Chart
Another
GridVIew
All of above
Q how
do you ensure that a validation control displays error message only when the
associated control is invalid?
Set
validator’s Displaymode =”Dynamic”
Set validator’s
Visible=”true” as soon as the value in associated control change.
Set validator’s
validaterequetMode=”Enabled”
None of the above
No comments:
Post a Comment