Änderungen
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
Imports System.IO
|
||||
Imports System.Net
|
||||
Imports System.Web.Script.Serialization
|
||||
Imports System.Web.Script.Services
|
||||
Imports System.Web.Security
|
||||
@@ -136,7 +138,7 @@ Partial Class LKWS
|
||||
throw2.Cells.Add(tblhc_KarteNr)
|
||||
TableRows.Add(throw2)
|
||||
tbl_mainpage.Rows.Add(throw2)
|
||||
Dim strlongarr As String
|
||||
|
||||
Dim strtemparr As String = String.Empty
|
||||
Dim strtemp2 As String = String.Empty
|
||||
Dim strarrtemp = String.Empty
|
||||
@@ -1088,4 +1090,28 @@ Partial Class LKWS
|
||||
HttpContext.Current.Response.ContentType = "application/json"
|
||||
Return New FormattedList(HttpContext.Current.Request("sEcho"), listdetails_M.Count.ToString, listdetails_M.Count.ToString, listdetails_M)
|
||||
End Function
|
||||
<WebMethod>
|
||||
<ScriptMethod(ResponseFormat:=ResponseFormat.Json, UseHttpGet:=False)>
|
||||
Public Shared Function gethtmltostring(url As String) As String
|
||||
Dim Request As HttpWebRequest = HttpWebRequest.Create(url)
|
||||
Request.Method = "GET"
|
||||
Dim Response As HttpWebResponse = Request.GetResponse()
|
||||
'Mapping of status code
|
||||
If Response.StatusCode = HttpStatusCode.OK Then
|
||||
|
||||
Dim receiveStream As Stream = Response.GetResponseStream()
|
||||
Dim readStream As StreamReader = Nothing
|
||||
|
||||
If Response.CharacterSet = String.Empty Then
|
||||
readStream = New StreamReader(receiveStream)
|
||||
Else
|
||||
readStream = New StreamReader(receiveStream, Encoding.GetEncoding(Response.CharacterSet))
|
||||
|
||||
''Get news data in json string
|
||||
''You will get html source here......
|
||||
Dim Data As String = readStream.ReadToEnd()
|
||||
Return Data
|
||||
End If
|
||||
End If
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user