What is an alternate way of Casting controls other than CType in VB.Net?

 Posted by vishalneeraj-24503 on 12/23/2013 | Category: VB.NET Interview questions | Views: 2587 | Points: 40
Answer:

DirectCast is an an alternate way of Casting controls other than CType in VB.Net.
DirectCast is same as CType.

For Example:-

Dim lbl_employee_name As Label = DirectCast(e.Row.FindControl("lbl_employee_name"), Label)


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response