问题前提:DIM allSTRNG as string 其中我已把allSTRING参数的内容为<ASX VERSION=3.0> <TITLE>【音乐世界】</TITLE><ENTRY><ref href=http://127.0.0.1/musicdata/爱.mp3/></entry><ENTRY><ref href=http://127.0.0.1/musicdata/爱.mp3/></entry><ENTRY><ref href=http://127.0.0.1/musicdata/爸爸妈妈.mp3/></entry></ASX>了,本人想把allSTRING的内容生成一个PLAY.ASX的文件,(此文件是临时的,)通过播放器播放!
孟子那些高手一定会!
孟子那些高手一定会!
System.IO.StreamWriter sw = new StreamWriter(@"c:\PLAY.ASX", false, System.Text.Encoding.Default);
try
{
sw.Write(allSTRNG);
}
finally
{
sw.Close();
}
Dim FS As FileStream
Dim SW As StreamWriter
FS = New FileStream(Server.MapPath("play.asx"), FileMode.Create, FileAccess.Write)
SW = New StreamWriter(FS)
SW.Write(allSTRING)
FS.CLOSE
strCHECK = gridCHECK.FindControl("checked")
If strCHECK.Checked = True Then
str_STRING = CType(gridCHECK.FindControl("selectON"), Label).Text
strID.Add(str_STRING)
Dim I As Integer = 0
For I = 0 To strID.Count - 1
allstring += strID(I)
Next
End If
Next
会出现第一条的数据会出现两次!不知如何解决?请高手帮忙.(出现二次这个http://127.0.0.1/musicdata/爱.mp3)