web application
ASP.NET &
VB.NET(code behind)
i got a parent form "parent.aspx"
have placed a button "Attachment" and a div "div1"
"onclick" i open the form "fload.aspx"
i got a "file control" and a list box.
the buttons are "add", "remove", and "attach"
i store the list of files in a hidden variable "txthd2".
when onclick "attach", i assign the values in the "txthd2" to the div
of the parent.aspx and close the fload.aspx window.
when i click the attach button in the fload.aspx file it is saying an error
line: 1
char: 48
error: Expected ';'
url:
http://localhost/lf/fload.aspx
the code used for attach button is
Private Sub btnAt_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAt.Click
Dim i
Dim arr As Array
For i = 0 To ListBox1.Items.Count - 1
arr = Split(ListBox1.Items(i).Value, "\")
txthd2.Value = txthd2.Value & arr(arr.Length - 1) & ","
Next
Response.Write("<script language='javascript'>")
Response.Write("function attach()")
Response.Write("{")
Response.Write("If (Form2.txthd2.value != '')")
Response.Write("{")
Response.Write("var parentFrm = window.parent.document.forms[0];")
Response.Write("parentFrm.div1.innerHTML = Form2.txthd2.value;")
Response.Write("window.close();")
Response.Write("}")
Response.Write("}")
Response.Write("attach();")
Response.Write("</script>")
End Sub
i don't know why the error is coming