View Single Post
  #1 (permalink)  
Old January 4th, 2007, 03:42 PM
timmerdfw timmerdfw is offline
Registered User
Join Date: Jan 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Convert JavaScript OK/CANCEL to VBScript

Can anyone help me convert this from Javascript to VBScript ?

<form id="Form1" method="post" runat="server">
<asp:Button ID="btnTest" Runat="server" Text="Click Here" />
<script type="text/javascript" language="javascript">

function bntTestClicked()
var result = confirm('Are you sure you want to do this?');
//user clicked OK button
alert("User Clicked OK");
// user hit cancel button
alert("User Canceled");

Code behind file:
private void Page_Load(object sender, System.EventArgs e)
btnTest.Attributes["onclick"] = "return bntTestClicked();";

Happy Programming...
:Timmy D from Big D:
Reply With Quote