Avatar of arunatata
arunatata
 asked on

option strict disallows implicit conversions from system.object to string

I have both option strict and option explicit turned on in my project. When i build it i get the following error:

" option strict disallows implicit conversions from system.object to string"

I am getting this error for the piece of code below:

            If DataReader.Read() Then

                PersonCheckingOut.Text = DataReader("NameCheckingOut") 'on this line
                Reason.SelectedValue = DataReader("ReasonCheckedOut")  'on this line
                TesterName.Text = DataReader("TesterUsedOn")                 'and on this line as well..

           end if

What is the solution for this?
ASP.NET

Avatar of undefined
Last Comment
deepaklakhani

8/22/2022 - Mon
deepaklakhani

try this:


TesterName.Text = DataReader("TesterUsedOn").ToString()
ASKER CERTIFIED SOLUTION
deepaklakhani

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23