Why do I get error message ‘Option Strict On disallows implicit conversions from ‘System.Web.UI.Control’ to ‘System.Web.UI.WebControls.TextBox’.’

Platform: ASP.NET| Category: TextBox

For type Casting apply the following steps

VB.NET


dim aprtxt as string
aprtxt= CType(e.Item.FindControl('txtapr'), TextBox)

C#


string aprtxt;
aprtxt = (TextBox) e.Item.FindControl['txtapr'];

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.