how can I make the button_click to execute first before the script that I added in the buttons's attribute
VB Code:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Put user code to initialize the page here Dim scriptOk As String scriptOk = "window.returnValue = true; " _ & " window.dialogArguments.strName = window.document.all.MyFile.value; " _ & " window.close();" btnOk.Attributes.Add("onclick", scriptOk) btnCancel.Attributes.Add("onclick", "window.returnValue = false;window.close();") End Sub Private Sub btnOk_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOk.Click 'Response.Write("hello") 'MyFile.PostedFile.SaveAs("") End Sub
myFile is an htmlinputfile server control, I want the file to be uploaded first before the web page execute the script to close the window
Thanks,
Jewel




Reply With Quote