Click here to Skip to main content
15,913,934 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionother fourms Pin
vocaris10-Aug-07 8:00
vocaris10-Aug-07 8:00 
AnswerRe: other fourms Pin
meofcourse14-Aug-07 6:32
meofcourse14-Aug-07 6:32 
QuestionWebclient Proxy server authentication failure when on alternate thread Pin
dman77779-Aug-07 8:42
dman77779-Aug-07 8:42 
QuestionNeed to Connect to UNIX server From Desktop Pin
OldDog5009-Aug-07 8:29
OldDog5009-Aug-07 8:29 
AnswerRe: Need to Connect to UNIX server From Desktop Pin
MidwestLimey13-Aug-07 7:44
professionalMidwestLimey13-Aug-07 7:44 
GeneralRe: Need to Connect to UNIX server From Desktop Pin
OldDog50017-Aug-07 3:51
OldDog50017-Aug-07 3:51 
QuestionProblem getting value Pin
TAK789-Aug-07 6:24
TAK789-Aug-07 6:24 
AnswerRe: Problem getting value Pin
Dave Kreskowiak9-Aug-07 7:55
mveDave Kreskowiak9-Aug-07 7:55 
First, you didn't specify which line the expection is thrown on. I'm not really up to guessing, but I can see a glaring problem.

In this code:
Dim TitleLink As HyperLink = CType(e.Item.FindControl("ProdTitleLink"), HyperLink)
Dim TextLink As HyperLink = CType(e.Item.FindControl("ProdTextLink"), HyperLink)
Dim prodID As HtmlInputHidden = CType(e.Item.FindControl("ProductID"), HtmlInputHidden)

you're assuming that the call to FindControl actually returns a control. If you're trying to use the TitleLink, TextLink, and prodID objects, and FindControl did NOT find the controls you THINK they did, you'll get the error you're talking about.

Check the return values/objects of methods before you attempt to use those values/objects. You might not get back what you think you should be getting.



A guide to posting questions on CodeProject[^]

Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007


GeneralRe: Problem getting value Pin
TAK789-Aug-07 7:58
TAK789-Aug-07 7:58 
GeneralRe: Problem getting value Pin
Dave Kreskowiak9-Aug-07 8:13
mveDave Kreskowiak9-Aug-07 8:13 
QuestionRip CD Pin
meofcourse9-Aug-07 5:22
meofcourse9-Aug-07 5:22 
AnswerRe: Rip CD Pin
Kschuler9-Aug-07 9:18
Kschuler9-Aug-07 9:18 
GeneralRe: Rip CD Pin
meofcourse9-Aug-07 9:47
meofcourse9-Aug-07 9:47 
AnswerRe: Rip CD Pin
meofcourse9-Aug-07 12:20
meofcourse9-Aug-07 12:20 
AnswerRe: Rip CD Pin
ianbacalla9-Aug-07 23:26
ianbacalla9-Aug-07 23:26 
GeneralRe: Rip CD Pin
meofcourse11-Aug-07 17:57
meofcourse11-Aug-07 17:57 
GeneralRe: Rip CD Pin
ianbacalla14-Aug-07 16:00
ianbacalla14-Aug-07 16:00 
GeneralRe: Rip CD Pin
meofcourse14-Aug-07 18:23
meofcourse14-Aug-07 18:23 
GeneralRe: Rip CD Pin
Dogu Tumerdem22-Jan-10 2:50
Dogu Tumerdem22-Jan-10 2:50 
AnswerRe: Rip CD Pin
meofcourse14-Aug-07 6:30
meofcourse14-Aug-07 6:30 
GeneralRe: Rip CD Pin
ianbacalla14-Aug-07 21:22
ianbacalla14-Aug-07 21:22 
GeneralRe: Rip CD Pin
meofcourse15-Aug-07 4:46
meofcourse15-Aug-07 4:46 
Questionstring array to Byte array....conversion problem Pin
Cory Kimble9-Aug-07 4:51
Cory Kimble9-Aug-07 4:51 
AnswerRe: string array to Byte array....conversion problem Pin
Luc Pattyn9-Aug-07 5:05
sitebuilderLuc Pattyn9-Aug-07 5:05 
GeneralRe: string array to Byte array....conversion problem Pin
Cory Kimble9-Aug-07 5:42
Cory Kimble9-Aug-07 5:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.