Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." 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 Basics 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 July 31st, 2007, 09:46 AM
Registered User
 
Join Date: Jul 2007
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default pass parameter

i want to pass two parameter through request.query string from my asp.net page to a classic asp page.is it possible?
i did so but values not passed to "gen_licenseLocal.asp"

----------asp.net page code:-------------

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        Try

            Dim sn As Integer = TxtID.Text
            Dim SerialNo As String = TxtSerialNo.Text
            Response.Redirect("gen_licenseLocal.asp?custom=" & SerialNo & "SrNo=" & sn)
        Catch ex As Exception
            Response.Write(ex.Message)
        End Try
    End Sub

-----------------classic asp code:


dim temp_table_id, paypal_email, qty,varSrNo

    temp_table_id = cInt(request.querystring("custom"))
    if temp_table_id = 0 then
        response.Redirect("purchaseLicense.asp?invalid access")
    end if

varSrNo=request.querystring("SrNo")

if varSrNo="" then
        response.redirect("PurchaseLicense.asp?invalid access")



 
Old August 12th, 2007, 01:07 AM
Authorized User
 
Join Date: Sep 2003
Location: , , .
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

it should be. double check with request.querystring

 
Old August 30th, 2007, 11:18 AM
Friend of Wrox
 
Join Date: May 2006
Location: San Diego, CA, USA.
Posts: 643
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Are you getting an error message?

One possible problem is that youir querystring is not properly formed in the following line:

Code:
Response.Redirect("gen_licenseLocal.asp?custom=" &    SerialNo & "SrNo=" & sn)
It should be as follows:
Code:
Response.Redirect("gen_licenseLocal.asp?custom=" &    SerialNo & "&SrNo=" & sn)
Note the ampersand separator used for delimiting the querystring parameters.

Of course, there could be other problems as well.

Woody Z
http://www.learntoprogramnow.com
How to use a forum to help solve problems




Similar Threads
Thread Thread Starter Forum Replies Last Post
Pass a parameter in a link jmss66 Classic ASP Basics 1 October 20th, 2006 02:23 PM
How to pass parameter to sub-report . azeerum Access 1 January 3rd, 2005 04:26 PM





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