Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


How to use parameters in ASP


I'm a beginner with ASP. could anyone tell me how to use parameters on my asp pages? in PHP I only have to submit them to my url like test.php?Myparam=Hello%20world&MySecondPar=ABCDEFG in the code itself I can then use my parameters like: print $Myparam

When I open my asp testpage

Response.Write "<P>Today is " & Date () & "."
Response.Write "

Parameter is " & par & ".



like this: test1.asp?par="hello"

it doesn't show hello Why not, what do I have to do to make this work ?

the Netherlands...


  • chick80chick80 Member Posts: 349
    [b][red]This message was edited by chick80 at 2002-9-8 11:8:51[/red][/b][hr]
    It doesn't write nothing because par is not defined!
    Try this:

    Dim param
    param = Request.QueryString("par")
    Response.Write "Parameter is: " & param
    This if you pass the parameter with GET.
    If you pass it with POST you'll have to use
    param = Request.Form("par")


    [italic]How beautiful, if sorrow had not made Sorrow more beautiful than Beauty itself.[/italic]

  • mac_doggiemac_doggie Member Posts: 488
    Thanxxx I will try it.
    the Netherlands...

  • Andre YoungAndre Young USAMember Posts: 0

    ______ ( ) free video tutorials and ebooks about / Visual Basic .NET C C++ R Ruby Python C# PHP Go Scratch PL/SQL Swift Java Assembly MATLAB Delphi JavaScript Perl Objective-C Visual Basic Kotlin SAS VBScript ML Crystal D COBOL FoxPro Bash Erlang Hack Rust Clojure Scheme Scala Prolog Dart Apex Lisp Julia ABAP Awk Logo Alice F# Lua LabVIEW Ada Fortran Transact-SQL / ______________

Sign In or Register to comment.