Вы находитесь на странице: 1из 18

Babu Madhav Institute of Information Technology, UTU 2016

5 Years Integrated M.Sc.(IT) – Semester 5


Question Bank
060010501– Fundamentals of Web Development using ASP.NET

Unit 1 Introduction to ASP.NET


1 MCQ Based Question
1. When an ASP.NET file is placed on an IIS server and viewed through a browser, the resulting HTML
page contains:
a) All ASP.NET code.
b) As much ASP.NET code as is in the ASP.NET file.
c) A mix of ASP.NET and HTML code.
d) All HTML code.
e) None of the above.
2. Which property is used to name a web control?
a) Control Name
b) Designation
c) ID
d) Name
e) Title
3. Which user action will not generate a server-side event?
a.) Mouse Move
b.) Text Change
c.) Button Click
d.) Both a & b.
e.) All of the above.
4. Currently ASP.NET runs on which platform?
a) Windows
b) Linux
c) Windows and Linux
d) Any
5. In your ASP.NET web application you want to display a list of clients on a Web page. The client list
displays 10 clients at a time, and you require the ability to edit the clients. Which Web control is the
best choice for this scenario?
a) Detail View Control
b) Table Control
c) Gridview Control
d) Form Control
6. While developing ASP.NET 2.0 web application you have a DataSet containing a Customer DataTable
and an Order DataTable. You want to easily navigate from an Order DataRow to the Customer who
placed the order. What object will allow you to easily navigate from the order to the customer?
a) DataColumn Object
b) DataRaw Object
c) DataTable Object
d) DataRelation Object
7. For separating server-side code from client-side code on a ASP.NET page, what programming model should you
use?
a) Separation model
b) Code-Behind model
c) In-Line model
d) ClientServer model
8. In which events controls are fully loaded?
a) Page_Init

PREETI BHATT 1
Babu Madhav Institute of Information Technology, UTU 2016

b) Page_Load
c) Control events
d) Page_Unload events
9. What is the best way to store the connection strings?
a) Config files
b) Database text file
c) Session
10. What is the default value for the Method attribute in a ASP.NET server-side Form control
a) GET
b) POST
c) SOAP
d) SMTP
11. In a ASP.NET page, which is the best way to find if the contents of a TextBox has changed after the form
containing the TextBox has been posted back to the server
a) By comparing the old value with the new value
b) By checking the NewValue property of the TextBox control
c) By handling the TextBox control's TextChanged event
d) By checking the HasChanged property of the TextBox
12. Which statement among the one is correct?
a) The Params and Forms collection of the HTTPRequest class are exactly same and theForms
collection has been provided only for backward compatibility
b) The HTTPRequest class does include the Params collection
c) The HTTPRequest class does include the Forms collection
d) The difference between the Params and Forms collection of the HTTPRequest class is that the
Params collection also represents QueryStrings, ServerVariables, andCookies
13. You are writing ASP.NET 2.0 Web site that collects lots of data from users, and the data collection
forms spreads over multiple ASP.NET Web pages. When the user reaches the last page, you need to
gather all of data, validate the data, and save the data to the SQL Server database. You have noticed that
it can be rather difficult to gather the data that is spread over multiple pages and you want to simplify
this application. What is the easiest control to implement that can be used to collect the data on a
single Web page?
a) The View control
b) The TextBox control
c) The Wizard control
d) The DataCollection control
14. An Application variable is created:
a.) when the application is first placed on a web server.
b.) when the web server is first started.
c.) when the first client requests a URL resource.
d.) every time a client requests a URL resource.
e.) every time a new client interacts with the web application.
15. Which data type does range validation control support?
a) Integer string date
b) Integer and string
c) Only string
d) Only integer
16. You have designed a logon form with two TextBox controls named txtUserName and txtpassword. You
want to ensure that the user can enter only lowercase characters in the controls. Which of the
following solutions will fulfill this requirement using the simplest method?
a) Program the KeyPress event of the TextBox controls to convert uppercase letters to lowercase
letters.
b) Create a single event handler that is attached to the KeyPress event of the form. Program this
event handler to convert the uppercase letters to lowercase ones.
c) Set the CharacterCasing property of the Textbox controls to Lower.

PREETI BHATT 2
Babu Madhav Institute of Information Technology, UTU 2016

d) Use the CharacterCasing method of the controls to convert the letters to lowercase letters.
17. The CLR provides ____________ that defines the data type that are used by all .NET languages
a) MSIL
b) CTS
c) BCL
d) Dl
18. The _______________ manages the execution of .Net programs by providing essential functions such as
memory management, code execution, security and other services.
a) CTS
b) CLR
c) BCL
d) IL
19. You are developing an ASP.NET Web application. You create a master page. The master page requires a
region where you can add page-specific content by using the ASP.NET page designer. You need to add a
control to the master page to define the region. Which control should you add?
a) Content
b) ContentPlaceHolder
c) PlaceHolder
d) Substitution
20. You create an ASP.NET page named TestPage.aspx that contains validation controls. You need to verify
that all input values submitted by the user have been validated by testing the Page.IsValid property.
Which page event should you add an event handler to?
a) Init
b) Load
c) PreInit
d) PreLoad
21. After capturing the SelectedIndexChanged event for a ListBox control, you find that the event handler
doesn’t execute. What could the problem be?
a) The AutoEventWireup attribute is set to False
b) The AutoPostBack attribute is set to False
c) The codebehind module is not properly compiled
d) The ListBox must be defined WithEvents

2 Fill in the Blanks


1. ASP.NET control begins with the ___________ prefix.
2. Both ASP.NET web server control and HTML server control require the attribute ________ in order to be
handled on the server rather than on the client.
3. All web server controls exists within ___________________ namespace.
4. Compare validator control can use either property _______________ or _______________.
5. If any of the validation control generate Error message the ___________ property of page class is set to
____________.
6. ___________ control can also be used to check the date type of the value being validate and to check that
the value being falls in the range indicated by other form controls
7. Web controls are contained in the namespace ________________.
8. Value comparisons are controlled by the__________ and ___________ properties of the compare validation
control.
9. HTML server control two possible events are_______________ and _________________.
10. The button control _________________ property set to _________ will ignore the validation controls and will
posted back without validation.
11. All web controls are defined in the namespace ______________ and derived from class ____________.
12. The base class of all validation control is _______________.
13. Web.config file _____________ section use to define database connection string.
14. Validation Summary control display value of ___________ property of all validation control which
generate error.

PREETI BHATT 3
Babu Madhav Institute of Information Technology, UTU 2016

15. _____________ method is used to pass information using query string.


3 Short Question
1. Write difference between ServerClick and ServerChanger event.
2. What is ASP?
3. List any five basic web controls.
4. What is ASP.NET?
5. Write a code to display TextBox control on browser.
6. Justify “Is ASP.NET is a server-side technology”.
7. What is IIS? Why is it used?
8. List any five properties of CheckBoxList control.
9. Define: AutoPostBack
10. Which events are fired when a page loads?
11. What is the difference between the Response.Write() and Response.Output.Write() methods?
12. In which event are the controls fully loaded?
13. How can we identify that the Page is Post Back?
14. What is postback? Which property is used to identify it?
15. Define response object.
16. Write use of <% %> symbols.
17. State the difference between Checkboxlist control and Checkbox control.
18. How can you convert any static HTML control into an HTML-server control?
19. What is use of Trace control?
20. What does User object represent?
4 Long Question
1. List all ASP.NET pillars. Explain any four ASP.NET pillars.
2. Explain advantages of Visual Studio in detail.
3. Discuss key features of ASP.NET.
4. Explain code models that are support by Visual Studio?
5. Write a code for given snippet.
6. Explain ASP.NET page life cycle.
7. Discuss validation control in details.
8. Explain any four server control in detail.
9. List any four HTML controls and write minimum 10 properties of each.
10. List all page class and explain any one in detail.
11. Write a code to give slider effect in Web Form using AdRotator control.
12. Explain all available list controls in ASP.NET.
13. Explain features of ASP.NET 4.
14. Write a code snippet for following layout.

PREETI BHATT 4
Babu Madhav Institute of Information Technology, UTU 2016

15. Write a code to design a Registration page of Google.[Refer Google page for the same]
5 True or False
1. In asp.net the second level compilation happen just before the page executed.
2. ASP.NET validation control execute on client side and server side.
3. You cannot validate HTMLInputText control using validation controls.
4. C# is not "Strongly Typed" language.
5. ASP is a script-based programming language.
6. ASP.NET page are compiled not interpreted.
7. server.Transfer() method is slower than Response.Redirect() method.
8. For loop run faster in C# as compare to VB.NET.
9. All the .NET languages are compiled into another lower-level language before the code is executed.
10. ASP.NET can currently run only on Windows Platform.
11. Events in Web forms are processed before the “Page Load” event.
12. DateTime variable can be null.

Unit 2 Building ASP.NET Websites


1 MCQ Based Question
1. What is extension of “User Control”?
A. .aspx
B. .asax
C. .asux
D. .ascx
2. Which of the following tag can be used in “User Control”?
A. <HTML>
B. <DIV>
C. <Form>
D. <Body>
3. User control can be used in
A. Only in current application
B. Only in other application
C. Both
D. None
4. In which page event only, we can set master page?
A. Page.start
B. Page.Init
C. Page.Init complete
D. Page.Load
5. Which of the following command is not used in multiview?
A. ActiveViewByIndex
B. PrevView
C. NextView
D. SwitchViewByID
6. Which of following is not <%@Register%> tag property?
A. TagPrefix
B. Tagsufix
C. Src
D. Tagname
7. How to apply master page in web.config file?
A. <pages master ="SiteTemplate.master"/>
B. <pages PageFile ="SiteTemplate.master"/>
C. <pages masterPageFile ="SiteTemplate.master"/>
D. <pages masterFile ="SiteTemplate.master"/>

PREETI BHATT 5
Babu Madhav Institute of Information Technology, UTU 2016

8. Which of the following tag cannot be used in content page?


A. <span>
B. <div>
C. <body>
D. <table>
9. Which of the following template is not used in SiteMapPath?
A. <PathSeparatorTemplate>
B. <ParentNode>
C. <RootNodeTemplate>
D. <CurrentNodeTemplate>
10. Which property is used to make space between the current node and the node above and below?
i. NodeSpacing
ii. CurrendNodePadding
iii. ChildNodePadding
iv. VerticalPadding
11. Which property of control is set to attach Named skin with it?
a. Skin
b. Theme
c. SkinFile
d. SkinID
12. Which template is added to website to create CSS?
a. CSS file
b. Style sheet
c. XML file
d. Skin File
2 Fill in the Blanks
1. _______________is the file extension for a Master Page.
2. ____________directive is used to create a strongly typed reference to the master page.
3. At ____________stage of page processing master page and content page are merged.
4. ______________is the extension of “User Control”.
5. _______________file is used to define global variables and react to global events.
6. The _______________ option can be used to locate the folder where Microsoft themes have been
downloaded.
7. ______________ Element in the web.config file to run code using the permissions of a specific user.
8. _____________________ file is used to define global variables and react to global events.
9. __________________ is a special subfolder within the windows folder that stores the shared .NET
component.
10. The skin with SkinID is called _____________________ skin.
11. ____________________________Folder is created, when skin is added to the website.
12.
3 Short Question
1. What is a "theme" in ASP.NET?
2. What is the extension for a skin file?
3. What is the default skin?
4. What is the named skin?
5. What is the name of the folder that contains the application themes?
6. What is a global theme?
7. What is a Master Page?
8. What are the 2 important parts of a master page?
9. Can Master Pages be nested?
10. What is the file extension for a Master Page?
11. How do you identify a Master Page?
12. Can a Master Page have more than one Content Placeholder?

PREETI BHATT 6
Babu Madhav Institute of Information Technology, UTU 2016

13. What is a Content Placeholder?


14. How do you bind a Content Page to a Master Page?
15. Are controls on the master page accessible to content page code?
16. At what stage of page processing master page and content page are merged?
17. Can you access nonpublic properties and nonpublic methods of a master page inside a content page?
18. What are ASP.NET Custom controls?
19. How do you identify user controls?
20. What is the base class from which user controls derive?
21. What happens when you drag a user control from solution explorer and drop it on a web form?
4 Long Question
1. What are the differences between user controls and web pages?
2. How to convert a page to a user control?
3. How to handle events and properties in user control?
4. What are the different ways to apply CSS? Explain in detail.
5. What is theme? How to create and apply theme?
6. What are advantages of themes?
7. Explain concept of Master Pages in ASP.NET.
8. Write Detail note on Master Page.
9. What are the advantages of masterpage?
10. Give comparison of User control and Master Page.
11. Short note on multiview.
12. Explain SiteMapPath control.
13. Short note on TreeView control.
14. What is the use of Menu controls? Discuss menu control in detail.
15. Create menu control using database.
16. How can we create customized sitemap provider?
17. What is the difference between UserControl and CustomControl in ASP.NET?
18. What is URL Mapping? Explain with example.
19. What is URL Routing? Explain with example.
20. Write a note on Profile Properties.
5 True or False
1. You can access controls on the Master Page without using FindControl() method.
2. web.config file is used to define global variables and react to global events.
3. @MasterType directive is used to create a strongly typed reference to the master page.
4. .ascx is the extension of “User Control”.
5. <ParentNode> template is not used in SiteMapPath.
6. __________is client side state management technique.
7. You access controls on the Master Page without using FindControl() method.
8. Controls on the master page accessible to content page code.
9. Runat attribute is not written within the .skin file, when skin is ceated.
10. It is possible to set the theme at runtime.
11. It is possible to apply theme globally within web.config file.
12. One page contains multiple master pages.
13. We can add multiple theme in website.
14. Skin file is used for html tags.
15. Master page can be nested.
Unit 3 State Management
1 MCQ Based Question
1. Where does the view state store information?
a.) HTML source
b.) Text file
c.) URL
d.) Both a and b.

PREETI BHATT 7
Babu Madhav Institute of Information Technology, UTU 2016

e.) All of the above.


2. Where do cookies store information?
a.) HTML source
b.) Text file
c.) URL
d.) Both a and b.
e.) All of the above.
3. Which of the following is not the way to maintain state?
a) View state
b) Cookie
c) Hidden field
d) Request Object
4. Session_End fires in which of these SessionState modes?
a) Inproc
b) StateServer
c) SQLServer
d) None
5. Which property allows ASP.NET controls to maintain their values when a page is posted to itself.
a) EnableViewState
b) MaintainValue
c) SaveValue
d) AutoPostBack
6. You need to store state data that is accessible to any user who connects to your Web application.
Which object should you use?
a) Session
b) Application
c) Response.Cookies
d) Response.ViewState
7. Which client-side technique can be disabled by the end-user?
a.) Cookies
b.) Query string
c.) View state
d.) All of the above.
e.) Both a and b.
8. A Session variable is created:
a.) when the application is first placed on a web server.
b.) when the web server is first started.
c.) when the first client requests a URL resource.
d.) every time a client requests a URL resource.
e.) every time a new client interacts with the web application.
9. How do you explicitly kill user session?
a) Session.close()
b) Session.discard()
c) Session.abandon()
d) Session.end()
10. When will a session be started in an application?
a) Before Application Started
b) After Application Started
c) When the Client first sends a request to browser
d) While closing the application
11. Asp.net use ___________ to maintain state of control across the consecutive roundtrip of the server
a) Viewstate
b) Session
c) Cache

PREETI BHATT 8
Babu Madhav Institute of Information Technology, UTU 2016

d) Javascript
12. How does asp.net store sessionid by default?
a) cookie
b) cache
c) global variable
d) url strings or in db
2 Fill in the Blanks
1. _______ is used to store the page value.
2. ______ is loss the information when the page is refreshed.
3. ________ Page less state management.
4. ______ will send the data one page to another page using the URL.
5. _______ will store the data as browser history or user computer.
6. ________ State management control only used string data type.
7. _______ will store the information in hidden field. Department of Computer Science and Technology,
8. _______ will store the data as browser’s URL string.
9. Using ________ and ________ state management control user can easily modify the
10. In __________ state management control scope is limited for the current page.
11. In __________ state management control scope is limited for the target page.
12. In __________ state management control scope is for whole ASP.NET application.
13. _______ will store the data in server memory.
14. In custom cookies performance implications will________.
15. In _________ state management control store information lifetime.
16. The use of session.clear() is_______.
17. For expire session ________ method is use.
18. ________method is use for know the number of items in the current session collection.
19. _________ will provide unique session identification.

3 Short Question
1. Define Session.
2. What is the default session timeout period?
3. Where do you generally specify the Session Timeout?
4. Where do you generally specify the Session Timeout?
5. How do you end a user session?
6. What type of data can you store in Application State and Session State variables?
7. Is Application State or Session State variables type safe?
8. Can you turn of Session state?
9. What are Cookies in ASP.NET?
10. What are different types of Cookies?
11. What are Session Cookies?
12. What is the difference between Session Cookies and Persistent Cookies?
13. What are Persistent Cookies used for?
14. How do you create a Persistent Cookie?
15. How do you create a Cookie that never expires?
16. What is View State?
17. How do you enable or disable a View State for a control on the page?
18. How do you enable or disable a View State at the page level?
19. What is the name of the hidden form field in which View State of the page is saved?
20. When View State restoration does happen?
21. Can the HTML controls retain State across post backs?
22. Can someone view the Page HTML source and read View State?
4 Long Question
1. What is state management? List its advantages. Explain client and server side state management
technique.

PREETI BHATT 9
Babu Madhav Institute of Information Technology, UTU 2016

2. Explain session state management technique using example.


3. Explain the advantages and limitations of Viewstate technique.
4. Write any four difference between Application state and Session state.
5. Explain Session state management technique with example.
6. Write a code to store given detail in session variable and display on the label
Student Detail(Student name, Student address, Student gender, Student college name)
7. Write any four differences between Viewstate and QueryString.
8. Draw and explain session state architecture.
9. Write a code to create cookie and expires cookie.
10. Write a code to store user name in cookie and retrieve user name from the cookie.
11. Explain Viewstate state management technique.
5 True or False
1. View can store the value life time.
2. Cookies can store the value in URL string.
3. View stores the information in the hidden field.
4. Query string store information in the user’s browser.
5. Session is best option to store the user information.
6. Query string does not loss the information when page will refresh.
7. Cookies are set by the user.
8. If user closes and restarts the browser session will lost data.
9. Session expire by session.Abandon() method.
10. By default session will time out after 20 idle minutes.
11. Session.clear() expire session.
12. Session.clear() clear all the session value.
13. Session object store value in server memory.
14. Scope of cookie is for all asp.net application.
15. Session will lose information when enter new URL.
16. Cookie will send the data one page to another page using the URL.
17. Session will send the data one page to another page using session variable.
18. Query string will send the data one page to another page using the URL.
19. For temporary storage view is the best option.
Persistence cookie is better than view.
Unit 4 Data Access
1 MCQ Based Question
1. What does ADO stand for?
A. Advanced Data Object
B. Active Data Object
C. Acti
D. veX Data Object
E. ActiveX Directory Object

2. What is the Best approach that has to be used, if you need continuous connection to the Database?
E. ADO.NET
F. ADO
G. BOTH
H. None of the above

3. Which of the following class is not included in data provider?


A. Connection
B. Data Adapter
C. Dataset
D. Data Reader

PREETI BHATT 10
Babu Madhav Institute of Information Technology, UTU 2016

4. Which of the following illustrates the benefit of ADO.NET?


A. Interoperability
B. It uses DataSet to represent data in memory that can store data from multiple tables and multiple
sources.
C. Disconnected data access
D. All of above
5. In a connection string, _________________ represents name of the database.
E. DataSource
F. Initial Database
G. Initial Catalog
H. Catalog Database
6. Which of the following class is used to fill the dataset?
A. Data Table
B. Data Adapter
C. Data Reader
D. Command
7. Which of the following is not Data Provider?
A. Access provider
B. SQL server provider
C. ODBC provider
D. OLE DB provider
8. Which object of ado.net has the best performance, for retrieving the data
I. DataReader
J. DataAdapter
K. DataSet
L. DataTable
9. To access the connection string from the web.config file, ________________ namespace needs to
beincluded.
v. System.Web
vi. System.Web.Configuration
vii. System.Configuration
10. No of records in memory at any given point of time when the DataReader reads the Data
A. All reacords pulled by the reader
B. Only one record at a time
C. Depends on the data provider
D. Depends on the data source
11. Which of the following name space is used to connect with oracle database?
A. System.Data
B. System.Data.Oracle
C. System.Data.OracleDB
D. System.Data.Oracle
12. To execute a stored procedure, __________________ property of command object needs to be set.
A. CommandDirection
B. CommandSource
C. CommandText
D. CommandType
13. If we are not returning any records from the database which method is used
A. ExecuteReader()
B. ExecuteScalar()
C. ExecuteNonQuery()
D. ExecuteXmlReader()
14. Which of the following is not DataAdapter method?
A. Update()
B. Dispose()

PREETI BHATT 11
Babu Madhav Institute of Information Technology, UTU 2016

C. Display()
D. Equals()
15. The Databases that make up the data in a dataset
A. Should be from Single database source
B. Can be from multiple databases bases which are homogeneous
C. Can include many heterogeneous databases sources
D. None of the above
16. Which of the following is the method provided by the DataSet object to generate XML?
A. ReadXML
B. WriteXML
C. GetXML
D. All of above
17. Which of the following template is available in listview but not ingridview?
A. InsertItemTemplate
B. AlternatingTemplate
C. GroupTemplate
D. ItemTemplate
18. Which of the following column provides selection or editing buttons in gridview?
A. BoundField
B. ButtonField
C. CommandField
D. TemplateField
19. Which of the following format string is used in gridview to show numeric value
in percentage (45%)?
A. {0:C}
B. {0:PR}
C. {0:E}
D. {0:P}
20. Which of the following date format string is used to show date as 10/30/2008?
A. {0:f}
B. {0:D}
C. {0:F}
D. {0:d}

2 Fill in the Blanks


1. __________ class provides fast read-only, forward-only access to the data retrieved from a query.
2. When we need to retrieve only a single value from the Database,__________ Method is efficient.
3. To populate the data set,__________ method of DataAdapter is used.
4. Default ___________ maximum number of connections allowed in the pool.
5. If DataReader returned more than one rowset, __________method moves the pointer to the next rowset.
6. ___________is a bridge in between DataSet and Database.
7. ___________object provide connection to the database.
8. ___________method indicates that a transaction was unsuccessful.
9. For insert, update, and delete SQL commands, _______________ method is used.
10. To check whether connection is open or not, ___________ property is used.
11. To Release the connection object, _____________ method is used.
12. __________section is used to store the connection string in web.config file.
13. To use DataSet, __________________ namespace needs to be included.
14. A set of tables are maintained in a Dataset as __________.
15. Control’s __________ method is used to copy the information from the DataSet into the control.
16. __________ Performs pattern matching with string data types in DataView.
17. In GridView __________ column displays text from a field in the data source.
18. We need to set __________ style to apply additional formatting to every other row.
19. __________ is by default page size in gridview.

PREETI BHATT 12
Babu Madhav Institute of Information Technology, UTU 2016

20. __________tag is use to add a hyperlink column to the DataGrid.


3 Short Question
1. What is ADO.net?
2. What is Data Provider?
3. List database providers available in ASP.NET.
4. What is the usage of Data provider?
5. Which name space is use to connect to a Microsoft SQL Server database?
6. Which interface is used to specify connection properties and methods?
7. What is the information that is almost requiring in any connection string?
8. What is the use of connection string? Explain with example.
9. What is connection pooling?
10. What do you mean by disconnected data access architecture of ADO.net?
11. How to read multiple set using Data Reader?
12. What is Dataset?
13. What is purpose of Dataset?
14. Which method do you invoke on the DataAdapter control to load your generated dataset with data?
15. What is databinding?
16. Which template must you provide, in order to display data in a Repeater control?
17. How can you provide an alternating color scheme in a Repeater control?
18. What property must you set, and what method must you call in your code, in order to bind the data
from a data source to the Repeater control?
19. Can you edit data in the Repeater control?
20. What tags do you need to add within the asp:datagrid tags to bind columns manually?
21. What property do you have to set to tell the grid which page to go to when using the Pager object?
22. Which property is used to enable of disable paging in gridview?
23. In which situation you will use parameterized query and in which situation you will use stored
procedure?
24. You have one stored procedure which returns 2 select statement results one by one, how to fetch
second select statement result in web application?
25. Can you explain how to enable and disable connection pooling?

4 Long Question
1. Short note on ADO.net architecture.
2. What are differences between ADO and ADO.net?
3. Explain Data Provider in detail.
4. Short note on database providers.
5. Explain command class properties and methods.
6. Diff. Data set and data reader. Explain with example.
7. Explain Data set object in detail.
8. Explain methods of data adapter.
9. Short note on DatView class.
10. Write C# code to use transaction in ADO.NET.
11. Explain datagrid control column types in ASP.NET.
12. What is numeric, date, time format strings?
13. Explain gridview styles in brief.
14. Short note on paging in gridview.
15. Discuss any 5 event of gridview.
16. Explain Listview templates.
17. Explain GridView and ListView controls.
18. Explain various objects in DataSet.
19. How to access connectionString from web.config? Discuss advantages of this approach.
20. How to set column as primary key in DataTable?
21. With code snippet explain how to add primary key constraint in DataTable.

PREETI BHATT 13
Babu Madhav Institute of Information Technology, UTU 2016

22. With example, explain Command Builder.


23. Write a note on Data Binding.
24. Write a note on Repeater control.
25. Write code-block and discuss how to add a new row in DataSet. Also explain how to save these changes
to DataSet.
26. Write detailed notes on: DetailView, FormView
5 True or False
1. We cannot get information out of database without directly using the ADO.NET classes.
2. ADO.NET uses XML to transfer data across applications and data source.
3. The classes of ADO.NET are defined in the System.Data namespace.
4. In ADO.Net command object, we can have more than one ReturnValueparameter.
5. We can add multiple rows in DataReader.
6. We can fill dataset using DataReader.Fill() method.
7. Dataset can store multiple tables in cache.
8. DataAdapter object populates a DataSet and resolves updates with the data source.
9. We can create relationship between the tables in a DataSet.
10. Ado.net is faster than ADO for disconnected recordsets.
11. It is not required to open the connection if I am using data adapter.
12. The ExecuteScalar() method returns the value stored in the last field of the first row of a result set
generated by the command’s SELECT query.
13. The ExecuteNonQuery() method returns 0 if your command isn’t an INSERT, DELETE, or UPDATE
statement.
14. In Commit() method pending changes should be stored permanently in the data source.
15. If you change the information in the DataSet, the information in the corresponding table in the
database changed automatically.
16. “CommandField” This column provides selection or editing buttons in GridView.
17. By default value of “AllowPaging” is true in gridview.
18. WebMatrixSqlDataSourceControl work with a MySQL connection.

Unit 5 Security
1 MCQ Based Question
1. Which of the following is the default authentication mode for IIS?
A. Anonymous
B. Windows
C. Basic Authentication
D. None
2. How to implement authentication via web.config?
A. Include the authentication element.
B. Include the authorization element.
C. Include the identity element.
D. Include the deny element.
3. Which of the following control provides a link for unauthenticated users to log on?
A. Login
B. LoginView
C. LoginStatus
D. LoginName
4. You are creating an ASP.NET application for CareerRide. The company uses Microsoft Windows
authentication. All users are in the CareerRide domain.
You want to configure the application to use the following authorization rules:

A. Anonymous users must not be allowed to access the application.


B. All employees except Raj and Shiva must be allowed to access the application.
5. Which code you will apply to configure the application?

PREETI BHATT 14
Babu Madhav Institute of Information Technology, UTU 2016

A. <authorization>
<deny users=” CareerRide \Raj, CareerRide \Shiva”>
<allow users=”*”>
<deny users=”?”>
</authorization>
B. <authorization>
<allow users=”*”>
<deny users=” CareerRide \Raj, CareerRide \Shiva”>
<deny users=”?”>
</authorization>
C. <authorization>
<deny users=” CareerRide \Raj, CareerRide \Shiva”>
<deny users=”?”>
<allow users=”*”>
</authorization>
D. <authorization>
<allow users=” CareerRide \Raj, CareerRide \Shiva”>
<allow users=”*”>
</authorization>
6. How many types of authentication ASP.NET supports?
A. Windows Authentication.
B. .NET Passport Authentication.
C. Forms Authentication.
D. All of the above.
7. You are creating an ASP.NET application for company CareerRide. You use form based authentication
to validate users. You need to prevent unauthenticated users from accessing the application. What
should you do?
A. In the authorization section of the Web.config file, set the users attribute of the deny element
to “?”
B. Set In the authorization section of the Web.config file, set the users attribute of the deny
element to “*”
C. In the authorization section of the Machine.config file, set the users attribute to the allow
element to “?”.
D. None of the above.
8. Where do we include the user lists for Form authentication?
A. < credential>
B. < authorization>
C. < Identity>
D. < authentication>
9. You use the ASP.NET Web Site Administration Tool to configure ASP.NET membership with forms
authentication. What should you name your login form so that you do not have to modify the
Web.config file?
A. Login.aspx
B. LoginPage.aspx
C. Default.aspx
D. Auth.aspx

2 Short Question
1. How do you sign out from forms authentication?
2. What is the difference between authentication and authorization?
3. What setting must be added in the configuration file to deny a particular user from accessing the
secured resources?
4. Define Authentication.
5. Define Authorization.

PREETI BHATT 15
Babu Madhav Institute of Information Technology, UTU 2016

6. What the authentication mode available in asp.net?


7. How do you set authentication mode in the asp.net application?
8. List out the difference between windows authentication and form authentication.
9. How do you provide secure communication in asp.net?
10. What is form authentication?
11. What is windows authentication?
12. What is passport authentication?
3 Long Question
1. List any six secure coding guidelines and explain any four in detail.
2. Why use form authentication? Explain in details.
3. How to implement Form authentication?
4. Write note on form authentication class.
5. Discuss form authentication Option.
6. Draw and explain Architecture of membership API.
7. How to configure connection string and membership Provider?
8. What are the different security controls available in ASP.NET? Explain any one in details.
9. Explain Login control in detail.
10. Explain password recovery control with code snippet and example
11. How to customize password recovery Template?
12. Why use windows Authentication? Explain in details.
13. Discuss windows authentication process with diagram.
14. Explain mechanism for windows authentication.
15. How to control the access the page in the directory to specific user?
16. How profile store the data?
Unit 6 Basic of Web Services
1 MCQ Based Question
1. _______________ is used to convert your application into Web-Application.
A. Struts Services
B. Java Service
C. Web Services
D. Browser Action
2. Web Services are _______________.
A. Application Components
B. Application Designing Tool
C. Application IDE
D. None of These
3. The basic Web Services platform is combination of _____ and _______.
A. CSS + HTTP
B. CSS + JAVA
C. XML + HTTP
D. XML + HTML
4. Long form of SOAP is ______________.
A. Simplified Object Arbitrary Protocol
B. Simple Object Access Protocol
C. Secure Object Access Protocol
D. None of these
5. Web services use ________ to code and to decode data.
A. SOAP
B. UDDI
C. XML
D. None of These
6. Web Services is used to -
A. Solve the interoperability problem

PREETI BHATT 16
Babu Madhav Institute of Information Technology, UTU 2016

B. Connect existing software


C. Reuse application-components
D. All of these
7. SOAP is an _________ to let applications exchange information over HTTP.
A. .NET-based protocol
B. JAVA-based protocol
C. XML-based protocol
D. PHP-based protocol
8. SOAP is a _________.
A. Markup
B. Language
C. Carrier
D. Protocol
9. SOAP is platform ___________.
A. Dependent
B. Independent
C. Depends on Browser
D. Both
10. SOAP is a format for sending messages and is also called as __________.
A. Network protocol
B. Communication protocol
C. Data Transfer protocol
D. Mail Transfer Protocol
11. _________ is a directory for storing information about web services.
A. UDDI
B. HTTP
C. CGI
D. SOAP
12. Web services communicate using __________.
A. Open-Close protocols
B. Open protocols
C. Close protocols
D. None of these
2 Fill in the Blanks
1. Long form of SOAP is ______________.
2. The basic Web Services platform is combination of _____ and _______.
3. _________ is a directory for storing information about web services.
4. SOAP is a format for sending messages and is also called as __________.
3 Short Question
1. What is Web Services?
2. List any two features of Web Services and define any one of them.
3. How to create web service?
4. Write a step to add service reference.
5. How to call the web service?
6. Write a code to configure web service URL.
7. Write any two difference between Rest and SOAP.
8. What is SEI?
9. What are the different styles of Web Services used for application integration?
10. What is WSDL?
11. Which data type available as default data type in WSDL type section?
4 Long Question
1. What is web services? What are the advantages of web services?
2. How web service is created and implement in application?

PREETI BHATT 17
Babu Madhav Institute of Information Technology, UTU 2016

3. Discuss SOAP in details.


4. Write a short notes on SOAP API.
5. Enlist all four sections of WSDL and explain each in detail.
6. List all three features of Web services and Explain all in detail.
7. Write a detail note on WSDL.
8. What is difference between top-down and bottom-up approach of developing web services?
9. Draw and Explain the SOAP message structure.

PREETI BHATT 18

Вам также может понравиться