I am changing our website over from using visual studio 2003 to 2005 so basically the code does not really need to change apart from some pathing issues. I am having a problem with a findcontrol...I have a control call marketingcampain which is on a summary page. When the user click on the placing order button the code is supposed to pick up the marketing control which consists of a dropdown list and a text box and simply pass the chosen info to the database.
I try to access the marketing control in the code behin but the control has a value of nothing:
Dim tempMarketingCampaign As New General_MarketingCampaign
tempMarketingCampaign = Me.FindControl("MarketingCampaign1")
tempAdNamesList = tempMarketingCampaign.FindControl("AdNamesList")
tbAddInfo = tempMarketingCampaign.FindControl("tbOther")
I get an error that says object not set to instance of an object. I am very confused as the code has not actually changed at all and in visual studio 2003 it worked fine.