2
我在彈出窗口中有下面的代碼。我想,當用戶點擊導出按鈕來關閉這個彈出,按鈕點擊後關閉彈出框
Protected Sub btnExport_Click(sender As Object, e As EventArgs) Handles btnExport.Click
Try
Dim sw As New StringWriter()
Dim w As New HtmlTextWriter(sw)
gv.RenderControl(w)
Dim content As String = sw.GetStringBuilder().ToString()
'I have generate pdf code here
'I want to close this popup
Catch ex As Exception
End Try
End Sub
你試過了'如果你的Button被按下'事件'然後卸載'你的彈出' –
使用'Close()'將關閉表單。 – JerryM