Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases 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
  #1 (permalink)  
Old August 28th, 2003, 08:36 PM
Registered User
 
Join Date: Aug 2003
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default button onclick send session id

How can I send a value (for ex id) from one asp page to another at the click of a button (not submit button)?

  #2 (permalink)  
Old September 4th, 2003, 03:46 PM
Registered User
 
Join Date: Sep 2003
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

really this is not ASP but javascript - to send the item - eg a session id - create a hidden control <input type="hidden" name="h1" value="<%=Session("MySessionVariable")%>"/>
and a button
<input type="button" name="btn1" value="Hit me hard" onclick="iamHit(this)"/>
with some javascript
<script>
function iamHit(ctl)
{
ctl.form.action="next_page.asp"
ctl.form.submit()
}
</script>




Similar Threads
Thread Thread Starter Forum Replies Last Post
Error at button onClick asters ASP.NET 1.0 and 1.1 Basics 5 July 23rd, 2008 09:35 AM
Button OnClick problem john6630 ASP.NET 2.0 Basics 2 September 21st, 2007 05:44 PM
Image button onclick msbsam ASP.NET 2.0 Basics 0 December 30th, 2006 04:47 AM
Button onClick Apocolypse2005 Javascript 1 November 25th, 2005 09:37 AM





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