Showing posts with label specific. Show all posts
Showing posts with label specific. Show all posts

Monday, March 26, 2012

Please help

Hi all
how can i get an information about the latitude and longitude for a specific country
by using a class in .NET ?

Thank youI'm not sure I understand your question...do you think that there is a class for getting the latitude and longitude for a specific country ? If there i'd be very suprised....

Do you mean that you want to write a class ?

Or perhaps you could use a web service ?

You could write a class to do this...
Hi Melch

i ask about is there exist a class for getting the the latitude and longitude for a specific country ?

Thanks for replay

Ahmed
I may be wrong on this, but I dont believe that there is one 'built in' to the .net framework...

If you think about it, there isn't anything special about latitude and longitude. You just have data.. The capital of the USA is at [XXX],[YYY].

You could make a database that stores all of the latitude and longitude information, and then use functions and classes to Selected countries where the latitude and longitude =...

Is there something special that you are trying to do with this?
> I may be wrong on this, but I dont believe that there is one 'built in' to the .net framework...

You're right. No such geographical functionality is included in the .NET Framework.

The original postermay find some benefit in theMicrosoft MapPoint Web Service.

Friday, March 16, 2012

Please Help me understand..

I want to create a page that pulls a specific record from a database based on the value passed from a Request.QueryString. If the value is not in the string then it uses a default value of 1(one). Here is what I have so far:

' Determine if a Content ID has been passed in the query string
' If so use it as a variable in our SQL string to grab content for the page
' Httpcontext.Request.Querystring("Content_id")

Sub BindHomeBodyData() ' GRAB CONTENT *************************

Const strSQL as String = "SELECT * FROM Content WHERE Content_ID = " & Httpcontext.Request.Querystring("Content_id")
Dim myCommand as New SqlCommand(strSQL, myConnection)
Dim myDA as New SqlDataAdapter()
myDA.SelectCommand = myCommand
Dim myDS as New DataSet()
myDA.Fill(myDS)
dlHomeBodyData.DataSource = myDS
dlHomeBodyData.DataBind()

End SubNot tested:

Dim Content_ID As Integer = 1

If Not IsNull(Request.QueryString("Content_id")) Then
Dim myRegEx As New RegEx("[^0-9]"), sContent As String = myRegEx.Replace(Request.QueryString("Content_id"), "")

If sContent <> "" Then
Content_ID = CInt(sContent)
End If
End If


to take what you have given me and place it into what I have. Sorry I am an extreme newbie. Here is what I have is there any way you could educate me here and show me how to write this out according to my example. Thanks a lot I appreciate it.

Sub BindHomeBodyData() ' GRAB CONTENT *************************

Const strSQL as String = "SELECT * FROM Content WHERE Content_ID = " & Httpcontext.Request.Querystring("Content_id")
Dim myCommand as New SqlCommand(strSQL, myConnection)
Dim myDA as New SqlDataAdapter()
myDA.SelectCommand = myCommand
Dim myDS as New DataSet()
myDA.Fill(myDS)
dlHomeBodyData.DataSource = myDS
dlHomeBodyData.DataBind()

End Sub