ASP Classic VBScript to ASP.NET C# Conversion -


i familiar asp.net, not visual basic.

here visual basic code:

 myxml="http://api.ipinfodb.com/v3/ip-city/?key="&api_key&"&ip=" &useripaddress&"&format=xml"  set xml = server.createobject("msxml2.domdocument.6.0")  xml.async = "false"  xml.resolveexternals = "false"  xml.setproperty "serverhttprequest", true  xml.load(myxml)  response.write "<p><strong>first result</strong><br />"  i=0 10      response.write xml.documentelement.childnodes(i).nodename & "  :  "      response.write xml.documentelement.childnodes(i).text & "<br/>"  next  response.write "</p>" 

what going on in code?

how can convert asp.net (c#)?

from looks of visual basic code, think should create 2 methods "convert" asp.net c# web page:

  1. loadxmldata method - use xmldocument load url via xmldocument's load function. read asp.net load xml file url example.

  2. builddisplay method - use asp.net placeholder or panel create container inject paragraph tag , individual results into.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -