ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old February 27th, 2003, 01:15 PM
pauldoylecraig pauldoylecraig is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 5 pauldoylecraig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy Returning Title Url and snippet

I am using Visual studio and have created a project in vb.net. I have carried out the simple search and return the number of hits, I am banging my head against a wall trying to return the title, urls and snippets of the matches. I know it most likely has to do with arrays and ASP. Once I have done this I would like to show the results on my web page., most likely do the search from the web page itself. If anyone could advise me, I would be extremely happy.

Thanks

Paul

Reply With Quote
  #2  
Old February 27th, 2003, 06:20 PM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Location: Sydney, AU
Posts: 2,058 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 8 m 57 sec
Reputation Power: 9
Send a message via ICQ to stumpy Send a message via MSN to stumpy
Not really sure what you're talking about here. Where are the hits being stored? In a database, a file, the logs?

How are you querying this hits storage?

Reply With Quote
  #3  
Old February 28th, 2003, 01:23 PM
pauldoylecraig pauldoylecraig is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 5 pauldoylecraig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy Implementing The Google Web Service In VB.NET

I have used the tutorial on Implementing The Google Web Service In VB.NET (in DevArticles). I am having difficulties returning the title, url and snippet of the results back to the vb.net project form.


Dim i As Int32
Dim max As Int32
Dim displayTitle As String
Dim maxResults As Int32 = 10
Dim _Query As String
Dim _formatString As String = "{0}.&nbsp;<a href=""{2}"">{1}</a><br>"

' create a Google Search object
Dim MyServiceb As Google.GoogleSearchService = New Google.GoogleSearchService()
' invoke the search method
Dim MyResultb As Google.GoogleSearchResult
MyResultb = MyServiceb.doGoogleSearch(MyLicenseKey, txtsearch.Text, 0, _maxResults, False, "", False, "", "", "")

' loop through formatting each result
For i = 0 To 10
' if the title for this result is blank use the URL instead
If (MyResultb.resultElements(i).title <> "") Then
DataGrid1.Text = CObj(MyResultb.resultElements(i).title)
'displayTitle = MyResultb.resultElements(i).title
'Else
' displayTitle = MyResultb.resultElements(i).URL()
End If
' format this result line
'sb.Append(String.Format(_formatString, (i + 1), displayTitle, MyResultb.resultElements(i).URL, MyResultb.resultElements(i).snippet))
Next i

End Sub

Is a datagrid the right toolbar option to use?

I know I have ' some of the lines as am trying to get the one array back for one of the title,url or snippet, before I try to join them.

I am extremely new to vb.net programming so and help you could give me would be very useful.

Paul

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingASP Development > Returning Title Url and snippet


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT