Select Case styleType Case 1 EXStyleForeColor

Select case styletype case 1 exstyleforecolor

This preview shows page 28 - 30 out of 144 pages.

Select Case styleType Case 1 EXStyle.ForeColor = System.Drawing.Color.White EXStyle.BackColor = System.Drawing.Color.Black Case 2 EXStyle.ForeColor = System.Drawing.Color.Black EXStyle.BackColor = System.Drawing.Color.White End Select Return EXStyle End Function. You want to write a public method that will apply these styles. You do not want to overwrite the ForeColor property and BackColor property of the Label control if these properties are already set by using the custom property procedures. Which code should you use for this method?A. Public Sub PickStyle(styleType As Integer) Dim EXStyle As Style = GetStyle(styleType) timeLabel.ApplyStyle(EXStyle) End Sub B. Public Sub PickStyle(styleType As Integer) Dim EXStyle As Style = GetStyle(styleType) TimeLabel.MergeStyle(EXStyle) End Sub C. Public Sub PickStyle(styleType As Integer) Dim EXStyle As Style = GetStyle(styleType) timeLabel.ForeColor = EXStyle.ForeColor timeLabel.BackColor = EXStyle.BackColor End Sub D. Public Sub PickStyle(styleType As Integer) Dim EXStyle As Style = GetStyle(styleType) TimeLabel.CssClass = EXStyle.CssClass End Sub Answer: B Explanation: The WebControl.MergeStyle method copies any nonblank elements of the specified style to the Web control, but will not overwrite any existing style elements of the control. This method is used primarily by control developers. Reference: .NET Framework Class Library, WebControl.MergeStyle Method [Visual Basic] Incorrect Answers A: WebControl.ApplyStyle Method copies any nonblank elements of the specified style to the Web control, overwriting any existing style elements of the control. We don’t want to overwrite any existing style elements however.
Background image
Exam Name: Developing and Implementing Web Applications with Microsoft Visual Basic.NET Exam Type: Microsoft Exam Code: 70-305 Total Questions: 212 Page 29 of 144 C: We don’t want to overwrite any existing style elements.- D: The WebControl.CssClass Property gets or sets the Cascading Style Sheet (CSS) class rendered by the Web server control on the client. It not useful in this scenario though. Question: 36. You create an ASP.NET application that produces sales reports. The sales data is stored in a Microsoft SQL Server database that is used for transaction processing. The application consists of complex Transact-SQL statements. Many users report that the report generation is taking longer to run each day. You need to improve response times. What are two possible ways to achieve this goal? (Each correct answer presents a complete
Background image
Image of page 30

You've reached the end of your free preview.

Want to read all 144 pages?

  • Spring '16
  • .NET Framework, Microsoft SQL Server, Microsoft Visual Studio

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture