Já það er aldrei að vita, hérna er kóðinn, endilega segðu mér ef þú sérð einhverjar villur:
sub Page_Load(sender as Object, e as EventArgs)
Dim FILENAME as String = Server.MapPath(“qsys.ini”)
Dim someString as String
Dim skrifaut as String
Dim started as String
Dim objStreamReader as StreamReader
objStreamReader = File.OpenText(FILENAME)
While objStreamReader.Peek() -1
someString = objStreamReader.ReadLine()
if left(someString, 8) = "[BUTTON]“ then
While objStreamReader.Peek() -1
someString = objStreamReader.ReadLine()
if left(someString, 4) = ”NAME“ then
started = ”true“
skrifaut = skrifaut & ”“ & someString.replace(”NAME“, ”“)
end if
if someString = ”“ and started = ”true“ then
exit While
end if
End While
end if
End While
response.write(”Þetta er lesið úr [BUTTON] í QSYS.INI")
response.write(skrifaut)
objStreamReader.Close()
end sub
<br><br>-
Alcohol is good for your health,
By Melrose