C
COHENMARVIN
I have a button in my asp.net page (actually its in a user control
with a .ASCX suffix) called btnGetData. I'm trying to make it force a
refresh of my page. So what I did was make it call javascript.
Should the following work? (It doesn't seem to)
Protected Sub btnGetData_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnGetData.Click
LoadGridView()
ForcePageRefresh()
End Sub
Sub ForcePageRefresh()
Dim popupScript As String
Dim instance As ClientScriptManager
instance = Page.ClientScript
popupScript = "<script language='JavaScript'>"
popupScript = popupScript & "
window.location.reload( true );"
popupScript = popupScript & "</script>"
instance.RegisterStartupScript(GetType(String), "PopupScript",
popupScript)
End Sub
with a .ASCX suffix) called btnGetData. I'm trying to make it force a
refresh of my page. So what I did was make it call javascript.
Should the following work? (It doesn't seem to)
Protected Sub btnGetData_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnGetData.Click
LoadGridView()
ForcePageRefresh()
End Sub
Sub ForcePageRefresh()
Dim popupScript As String
Dim instance As ClientScriptManager
instance = Page.ClientScript
popupScript = "<script language='JavaScript'>"
popupScript = popupScript & "
window.location.reload( true );"
popupScript = popupScript & "</script>"
instance.RegisterStartupScript(GetType(String), "PopupScript",
popupScript)
End Sub