Hi ,
am working with a Music Project which uses
vb.net and asp.net...
In my songs.aspx i have all the songs with check boxes and playselected button...when i clicked on playselected button only those songs are displayed to play in a popup whose checkbox is checked..
here my player plays the songs by wring xml file..
the following is the coe for playselected..
***************************************
Private Sub playSelected()
Dim check As Boolean
Dim Music As New MusicMachine
Dim strname As String = Music.GetMusicFileId
Dim item As DataGridItemDim writer As New XmlTextWriter(Server.MapPath("~\XML\") & strname & ".xml", Encoding.UTF8)
writer.WriteStartDocument()
writer.WriteStartElement("playlist")
Try
For Each item In FileSystemGrid.Items
Dim chkBx As CheckBox = CType(item.Cells(0).FindControl("deletethis"), CheckBox)
If chkBx.Checked Then
check = True
writer.WriteStartElement("element")
writer.WriteAttributeString("url", "Skins\skin1\Songs\" & Request.QueryString("Type") & "\" & Request.QueryString("Name") & "\" & item.Cells(2).Text)
writer.WriteEndElement()
End If
Next
writer.WriteEndElement()
writer.WriteEndDocument()
writer.Close()
If check <> True Then
Response.Write("<script language=""javascript"">alert('Select at least One Song!');</script>")
Else
Page.RegisterStartupScript("Popup", "<script> popup('player.aspx');</script>")
End If
Catch ex As Exception
Response.Write(ex.Message)
Response.End()
End Try
End Sub
************************************************** **********
And the code for funtion popup is...:
==============================
function popup(URL)
{ day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,men ubar=0,resizable=0, width=735, height=625');");
}
===========================
Here the problem is : If i check 2 songs an click on playselected the popup is coming with 2 songs...if i checked one more song and click on playselected then again a popup is coming with 3 songs..this should be avoide .means the previous popup has to be refreshed...
Please help me out
Thanks in advance
Madhavi