943,515 Members | Top Members by Rank

Ad:
  • C# Discussion Thread
  • Marked Solved
  • Views: 2306
  • C# RSS
You are currently viewing page 3 of this multi-page discussion thread; Jump to the first page
Dec 2nd, 2008
0

Re: combining methods

just to be sure we are still at the same place

what is the exact link that is passed in (what is linkItem)
Reputation Points: 133
Solved Threads: 141
Veteran Poster
dickersonka is offline Offline
1,162 posts
since Aug 2008
Dec 2nd, 2008
0

Re: combining methods

I just tried it on facebook.com and it worked fine. It took it a little while, but when it finished it showed up in my listView with "Good" or "Bad" next to it.
Reputation Points: 16
Solved Threads: 0
Junior Poster
sfrider0 is offline Offline
149 posts
since Oct 2008
Dec 2nd, 2008
0

Re: combining methods

linkItem is the website url string. It's the link that is being checked.
ex. http://www.facebook.com/
Last edited by sfrider0; Dec 2nd, 2008 at 11:32 pm.
Reputation Points: 16
Solved Threads: 0
Junior Poster
sfrider0 is offline Offline
149 posts
since Oct 2008
Dec 2nd, 2008
0

Re: combining methods

right, but when that throws an exception, what is the linkItem?
Reputation Points: 133
Solved Threads: 141
Veteran Poster
dickersonka is offline Offline
1,162 posts
since Aug 2008
Dec 2nd, 2008
0

Re: combining methods

"javascript:void(0)"
Last edited by sfrider0; Dec 2nd, 2008 at 11:43 pm.
Reputation Points: 16
Solved Threads: 0
Junior Poster
sfrider0 is offline Offline
149 posts
since Oct 2008
Dec 2nd, 2008
0

Re: combining methods

lol whoa, i thought you said it was microsoft
Reputation Points: 133
Solved Threads: 141
Veteran Poster
dickersonka is offline Offline
1,162 posts
since Aug 2008
Dec 2nd, 2008
0

Re: combining methods

yeah, my bad. I was just looking at the console output the first time. Then I checked my locals and "javascript:void(0)" was in linkItem.
Reputation Points: 16
Solved Threads: 0
Junior Poster
sfrider0 is offline Offline
149 posts
since Oct 2008
Dec 2nd, 2008
1

Re: combining methods

right, then the exception is correct

uri is expected to be a registered prefix, and javascript is not, things are working properly!!!
Reputation Points: 133
Solved Threads: 141
Veteran Poster
dickersonka is offline Offline
1,162 posts
since Aug 2008
Dec 3rd, 2008
0

Re: combining methods

Yes!! Thank you for your help!! I just added this code in there just to get it to run.
C# Syntax (Toggle Plain Text)
  1. if (!(linkItem.StartsWith("http://") || linkItem.StartsWith("https://")))
  2. linkItem = "http://link.bad/";
It works perfect now. I'm not real familiar with exceptions so I don't know how to get it to throw an exception when I get javascript or some other type link.
Reputation Points: 16
Solved Threads: 0
Junior Poster
sfrider0 is offline Offline
149 posts
since Oct 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C# Forum Timeline: Communicating Data Between Forms
Next Thread in C# Forum Timeline: exception pleasehelp





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC