|
I want to Fetch a particular location from google map of 5 km distance using zip code basis
I am using Google Web service.It is showing the error of Invalid key .
The code as follows:
Dim ProxyHost As String = "192.168.0.100"
Dim ProxyPort As Integer = 8080
Dim ProxyUser As String = ""
Dim ProxyPassword As String = ""
Dim ProxyDomain As String = "http://api.google.com/search/beta2"
Dim oWebProxy As System.Net.WebProxy = New System.Net.WebProxy(ProxyHost, ProxyPort)
oWebProxy.Credentials = New System.Net.NetworkCredential(ProxyUser, ProxyPassword, ProxyDomain)
' obj_wrr.Proxy = oWebProxy
'obj_wrr.Credentials = New System.Net.NetworkCredential(feedid, password)
Dim s As localhost.GoogleSearchService = New localhost.GoogleSearchService
s.Proxy = oWebProxy
Dim r As localhost.GoogleSearchResult
r = s.doGoogleSearch("", TextBox1.Text, 0, 10, False, "", False, "", "", "")
Dim strFile As String = "C:\\result.html"
Dim sw As StreamWriter = File.CreateText(strFile)
sw.WriteLine("" & Microsoft.VisualBasic.Chr(9) & "BODY { font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; font-size : 9pt; color : #000000; SCROLLBAR-FACE-COLOR: white; SCROLLBAR-HIGHLIGHT-COLOR: #003366; SCROLLBAR-SHADOW-COLOR: #003366; SCROLLBAR-3DLIGHT-COLOR: #f9f9f9; SCROLLBAR-ARROW-COLOR: #003366; SCROLLBAR-TRACK-COLOR: white; SCROLLBAR-DARKSHADOW-COLOR: #f9f9f9 }")
For Each dc As localhost.DirectoryCategory In r.directoryCategories
sw.Write("Category : ")
sw.WriteLine(dc.fullViewableName)
sw.WriteLine("
")
Next
For Each re As localhost.ResultElement In r.resultElements
Dim strTitle As String = "" + re.title + "
"
sw.WriteLine(strTitle)
Dim strSnippet As String = re.snippet + "
"
sw.WriteLine(strSnippet)
Dim strLink As String = "" + re.URL + " - " + re.cachedSize + "
"
sw.WriteLine(strLink)
sw.WriteLine("
")
Next
sw.Close()
Label1.Text = TextBox1.Text + " 's web search"
Dim estResults As Integer = r.estimatedTotalResultsCount
Dim ldTime As Double = r.searchTime
Label1.Text = "Total " + Convert.ToString(estResults) + " " + "1 - 10 seach result Total time:" + Convert.ToString(ldTime)
Dim obj As Object = Nothing
Dim di As DirectoryInfo = New DirectoryInfo(Environment.CurrentDirectory)
Dim strFilePath As String = di.FullName + "\" + strFile
WebBrowser.Navigate(strFilePath, obj, obj, obj, obj)
|
|
|
|
|
Did you sign up for a Google Maps API key here: http://www.google.com/apis/maps/[^]?
If so, you have to make sure you are using the key from the server that you typed into the API key signup page. If you are running it from your local system, then you need to generate a key for "localhost".
-Matt
------------------------------------------
The 3 great virtues of a programmer:
Laziness, Impatience, and Hubris.
--Larry Wall
|
|
|
|
|
Yes I sign up for a Google Maps API key for local host .But Same Error . Is there any other option to fetch a particular location from Map using zip code of 5 km Distance
|
|
|
|
|
Hi,
I am using ajax(anthem,also am new to this).I am using a ajax button control on click event of this i am validating the text entered and at the same time calling a method in cs file to check whether data exists in DB.However this method is not called and only the validations r performed.
Is it that if i use ajax button control i cannot call a method from cs file and only use javascript?
Herez my code:
private void btn_Login_Click(object sender, System.EventArgs e)
{
Anthem.Manager.AddScriptForClientSideEval("EnterText()") ;
this.Panel1.Visible = ! this.Panel1.Visible;
this.Panel1.UpdateAfterCallBack = true;
BindDataSource();//method written to chk whether username exists
}
is there any alternative way of calling the method
Thanks,
Mini
|
|
|
|
|
how can i make URLs clear ,avoiding dirty query strings As used in google (SEO) www.google.com/hpdir , www.google.com/hpdir/atrs . Not in this way www.google.com/hpdir?catid="arts" please help
wajeeh ahmed
|
|
|
|
|
You can rewrite the URl to make that clean. Here[^] you will get how to do that.
Best Regards,
Apurva Kaushal
|
|
|
|
|
I'm working on an ASP.NET 2.0 web app using C# and SQL Server 2000.
I assign my user informations to Profile.id,Profile.name,profile.email etc.
Now when I run application I'm getting a Provider.ProviderException stating "This property cannot be set for anonymous users". What does it mean and how can I fix it ?
thx,
www.behzadi.net
|
|
|
|
|
SIR,
Can u please tell me something about STA in VB.Net.
|
|
|
|
|
It stands for Single Threaded Apartment IIRC
|
|
|
|
|
Hi
I am working on web application using ASP.NET,vb.net & backend as SQL SERVER 2000.
1- I want construct a web page where any user can send an sms to US phone numbers only. The sms willbe send to around 6 gateways & the sms will be sent only through the correct gateway(i have a list with available gateways).
We will use an external SMTP to avoid blocking or blacklisting due to sending several sms's to wrong gateways.
2- Also i want to enable the sender to chose to route the response to his phone or email....
Any ideas on step 1,2,1 and 2.....
I would appreciate it
Thanks.
Samer
|
|
|
|
|
You can take some help from Here[^]
Best Regards,
Apurva Kaushal
|
|
|
|
|
hi
i want to print particular part of the page like datagrid for a report.
so how can it possible?
if any solution in Javascript, ASP.Net or CSS then you can reply me.
it's very important to me.
ok
Thanks
jigisha
|
|
|
|
|
Hi
Solution is
On pageload method just write as -
btnPrint.Attributes.Add("Onclick", "getPrint('print_area');")
(btnPrint is an id of html button control)
---------------------------------------------------------------------
------------Copy this function.......................................
function getPrint(print_area)
{
//Creating new page
var pp = window.open();
//Adding HTML opening tag with … portion
pp.document.writeln('<title>Print Preview')
pp.document.writeln('<base target="_self" />')
//Adding Body Tag
pp.document.writeln('');
//Adding form Tag
pp.document.writeln('');
//Creating two buttons Print and Close within a table
pp.document.writeln('');
//Writing print area of the calling page
pp.document.writeln(document.getElementById(print_area).innerHTML);
//Ending Tag of , and
pp.document.writeln('');
}
--------------------------------------------------------------------------
prakash sawant
|
|
|
|
|
Hi man
I wrote u some piece of code as a sample for ur question.
It's all about putting ur repeating control or the part you want in a div and give it an id and add the javascript
<html>
<head>
<script language=javascript>
function f1()
{
var divTest;
var divHTML;
var divText;
divTest = document.getElementById("testDiv")
divHTML = divTest.innerHTML;
divText = divTest.innerText;
window.alert(divHTML);
window.alert(divText);
}
</script>
</head>
<body>
<p align="center">
<input type="button" value="Test" onclick="f1();">
<br>
</p>
<div align=center id=testDiv>
<table width=500 border=1>
<tr align=center>
<td width=50%>Test Test Test</td>
</tr>
<tr align=center>
<td width=50%>Testing Testing Testing</td>
</tr>
</table>
</div>
</body>
</html>
Hope this would help
Best Regards
3ala2
|
|
|
|
|
Sir,
We use Public Functions and in it's definition using Get and Set Functions .Now the problem is When we can get each and every thing without using functions having Get and set functions in it's definitions .Then what's the advantage of using these functions.
Thanks.
|
|
|
|
|
I think you are talking about the properties not the functions. Properties are members that provide a flexible mechanism to read, write, or compute the values of private fields. Properties can be used as though they are public data members, but they are actually special methods called accessors. This enables data to be accessed easily while still providing the safety and flexibility of methods(source MSDN).
Best Regards,
Apurva Kaushal
|
|
|
|
|
Well you could use Getters and Setters as Java does (or did), but then you have 2 functions for each variable instead of one.
We could make the variable public, but then you can't add checks (and it's against incapsulation and thus against OO programming).
eg. (suppose x = private integer)
<br />
public int BiggerThenZeroAndSmallerThenHunderd{<br />
set{<br />
if(value < 100 && value > 0){<br />
x = value<br />
}<br />
else{<br />
}<br />
}<br />
get{<br />
return x;<br />
}<br />
}
hope this helps...
|
|
|
|
|
Hi,
1)how should i get the length of an audio file (eg. mp3 file )
2)Slice the audio file into several fragments
can anybody help me in this
Regards,
Sivaprasad
|
|
|
|
|
|
Hi
I am working on web application using ASP.NET,vb.net & backend as SQL SERVER 2000.
I want to pass one button through email...
When my application starts, one mail goes to the respective person.
This is the requirement of the project.
When that email goes, at the same time with that email i want to pass one button also.
On click of that button one field of the database table should get modified.
Plz. help me out.
Thanks.
Prakash Sawant
|
|
|
|
|
I think a button in a mail won’t work because an e-mail is not a web form. But you can set the <a> tags in the message body. Set the ‘href’ to a web form and write the code in that form’s page load event.
Regards,
Thomas
|
|
|
|
|
Sir,
Thanks for solution.
But the problem remains the same, yet.
I can send a button through email by writing the tag in body of email.
After sending a button through email, i want to do some database activity on click of that button and don't want to redirect any page from there.
So can u plz. guide me.
Thanking u.
prakash sawant
|
|
|
|
|
First of all do a aspx page that will be the template for the email.
After that send the generated html in the email message. Use "server.Execute" to get the html.
Here is a bit of code that does this:
http://www.daniweb.com/techtalkforums/thread38004.html
|
|
|
|
|
I still facing prob. regarding how to do operation on click of button which i am sending through email.
If i click of buttong send by email,
then onclick of that mail, i want to do some update operation in Sql Server table.
How to do this ?
prakash sawant
|
|
|
|
|
The event handler for the button on the aspx page will be executed.
|
|
|
|