Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old May 30th, 2006, 11:01 AM
Friend of Wrox
Join Date: Apr 2006
Posts: 160
Thanks: 0
Thanked 0 Times in 0 Posts
Default how to pass return value from Jscript to VB


i want to pass the return value from the javascript to VB.net. If it's 'False' the e.cancel must be executed.

Protected Sub GridView1_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GridView1.RowDeleting

Dim jv As String
jv = "function check()" _
& "{" _
& " alert('warning');" _
& " var ok=confirm(if you want to delete; click on OK');" _
& " if (!ok)" _
& " {" _
& " window.location.href='mult.aspx';" _
& " return false;" _
& "};" _
& "};" _
& "check();"

Page.ClientScript.RegisterClientScriptBlock(Me.Get Type(), "myscript", jv, True)

dim x as string
x= result of function check() : HOW TO DO THIS?
if x="False" then e.cancel=True

Thanks for helping

Similar Threads
Thread Thread Starter Forum Replies Last Post
function return collection in class by VB jimusa Visual Studio 2005 1 July 30th, 2008 03:12 PM
Return TYPE TABLE to VB from Oracle muttleychess Pro VB Databases 3 August 2nd, 2006 03:28 PM
how to pass return value from Jscript to VB hertendreef VS.NET 2002/2003 0 May 30th, 2006 11:00 AM
Return information from cmd to VB HelgeB VB How-To 4 December 1st, 2004 05:34 AM
Use of one jscript fn, 1 VB fn on Button click bvrao VS.NET 2002/2003 2 January 12th, 2004 03:41 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.