Home » Posts tagged "Javascript"

Archive for the 'Javascript' Tag

Close thickbox (popup) refresh parent page

Test.aspx <html xmlns=”http://www.w3.org/1999/xhtml”> <head runat=”server”> </head> <body> <form id=”form1″ runat=”server”> < %= Me.UpdMsg %> </form> </body> </html> Test.aspx.vb Protected UpdMsg As String Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)Handles Me.Load If Page.IsPostBack Then UpdMsg = “<a href=’#’ onClick=’parent.location.reload(1)’>Close!</a>” End If End Sub

VB.NET – End user session

To end user session and disable user from using a back button to go back to secure page, you need two pages i simply named killsession.aspx and logout.aspx. I will explain both pages with code behind and markup code. killsession.aspx killsession.aspx (markup code) < !DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”> <html xmlns=”http://www.w3.org/1999/xhtml”> <head […]

Delete confirm javascript

<a href=”default.asp?do=del&rid=<%= objRS(“ID”) %>” onclick=”return confirm(‘Are you sure you want to delete?’)” >Delete</a>