
Q121
Q121 What is ASP.NET primarily used for?
Building web applications
Managing databases
Developing desktop applications
Testing APIs
Q122
Q122 What is the role of the Global.asax file in an ASP.NET application?
Define UI elements
Configure database connections
Handle application-level events
Store CSS styles
Q123
Q123 How does the ViewState mechanism work in ASP.NET?
Stores data in the server's memory
Stores data in the client browser
Stores data in the database
Stores data in cookies
Q124
Q124 What is the difference between a Web Form and an MVC application in ASP.NET?
Web Form uses server controls, MVC uses Razor
Web Form is compiled, MVC is interpreted
Web Form has no lifecycle, MVC does
Web Form cannot use LINQ
Q125
Q125 What is the correct syntax to define a server-side button click event in ASP.NET?
<asp:Button OnClick="Button_Click" />
<button onclick="Button_Click" />
<input type="button" runat="server" OnClick="Button_Click" />
<Button runat="server" Click="Button_Click" />
Q126
Q126 How do you enable session state in an ASP.NET application?
Enable session in Global.asax
Use the Web.config file
Add session in code-behind
All of these
Q127
Q127 Identify the issue in the following code:
<asp:Button Text="Click" OnClick="Btn_Click" /> Sub Btn_Click(sender As Object, e As EventArgs) Response.Write("Hello") End Sub
Button has no ID
Response.Write is not valid
Btn_Click is not defined as Protected
ASP tag is not closed
Q128
Q128 How can you debug an ASP.NET web application in Visual Studio?
Attach to IIS process
Use the Debug toolbar
Use Console.WriteLine
Use Breakpoints only
Q129
Q129 Why might a web page throw a "ViewState is invalid" error in ASP.NET?
ViewState is disabled
Page size is too large
ViewState data is tampered with
ViewState is empty
Q130
Q130 What is the purpose of the "Async" keyword in VB.NET?
To define synchronous methods
To define asynchronous methods
To improve code readability
To reduce memory usage
Q131
Q131 What is a lambda expression in VB.NET?
A named function
An anonymous function
A recursive function
A property
Q132
Q132 What is the purpose of the "Yield" keyword in VB.NET?
To pause and resume execution in iterators
To create a loop
To define properties
To manage memory usage
Q133
Q133 What is the difference between a Task and a Thread in VB.NET?
Tasks are synchronous
Threads are asynchronous
Tasks are managed by the runtime
Threads are managed by the runtime
Q134
Q134 What does the following code output?
Async Function GetData() As Task(Of String) Return Await Task.FromResult("Data Loaded") End Function Console.WriteLine(Await GetData())
Data Loaded
Error
Task completed
Null
Q135
Q135 What is the error in the following code?
Dim result = Async Function() Return 5 Console.WriteLine(result.Result)
Async functions cannot return values
Await is missing
Result cannot be accessed
Async is invalid in VB.NET
Q136
Q136 How can you debug asynchronous methods in VB.NET?
Use the Immediate Window
Use breakpoints
Use Async Visual Studio tools
Log the outputs
Q137
Q137 Why might a Task in VB.NET not complete as expected?
Incorrect await usage
Task is canceled
Deadlock
All of these
Q138
Q138 What is the purpose of secure coding practices in VB.NET?
To enhance performance
To prevent security vulnerabilities
To reduce code size
To simplify debugging
Q139
Q139 How does parameterized queries help in VB.NET security?
Prevents SQL injection
Improves query performance
Reduces runtime errors
Simplifies debugging
Q140
Q140 What is the role of encryption in VB.NET security?
To prevent unauthorized data access
To reduce code redundancy
To enhance runtime performance
To handle exceptions
Q141
Q141 What is the purpose of the SecureString class in VB.NET?
To securely store string data in memory
To improve application performance
To simplify string operations
To encrypt database connections
Q142
Q142 What does the following code do?
Dim secure As New SecureString secure.AppendChar("P"c) secure.MakeReadOnly()
Encrypts the string
Stores a read-only secure string
Converts string to integer
Throws an error
Q143
Q143 Identify the security issue in the following code:
Dim query As String = "SELECT * FROM Users WHERE Username = '" & userInput & "'"
Potential SQL injection
Syntax error
Database connection failure
Hardcoding is not allowed
Q144
Q144 How can you identify a security vulnerability in VB.NET code?
Use debugging tools
Perform static code analysis
Enable runtime logging
Test the code manually
Q145
Q145 Why might a VB.NET application fail during authentication?
Incorrect password hashing
Lack of input validation
Session timeout
All of these
Q146
Q146 What is a common use case for VB.NET in real-world applications?
Game development
Windows desktop applications
Mobile app development
Embedded systems
Q147
Q147 How does VB.NET handle real-time data processing in enterprise applications?
Using threading
Using asynchronous programming
Using database polling
Using event-driven programming
Q148
Q148 What is the primary benefit of using VB.NET for building enterprise applications?
Simplified syntax
Scalability and integration with .NET
Cross-platform development
Minimal memory usage
Q149
Q149 Identify the issue in the following code for a case study:
Dim total As Integer = Nothing Console.WriteLine(total + 10)
Invalid type conversion
NullReferenceException
Compile-time error
No issue
Q150
Q150 While debugging a VB.NET application for an IoT case study, the program hangs during data retrieval. What could be the reason?
Network latency
Deadlock
Unoptimized queries
All of these

