DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2

Thread: Coding in asp

  1. #1
    chinkok Guest

    Coding in asp


    how do i sent the variable which key in by user in the txtVisaID to the Encrypt
    function when the user click the submit button.. psl help........ thanks
    a lot



    <HTML>
    <HEAD>
    <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
    </HEAD>
    <BODY>
    <%
    Function Encrypt(txtVisaID)
    if txtVisaID = "1" then
    Session("VisaID") = "aaaa"
    elseif txtVisaID = "2" then
    session("VisaID") = "bbbb"
    else
    session("VisaID") = "don't know"
    end if
    end Function
    %>
    <form action = "try.asp" name = "frmVisa" method = "post" onSubmit = "<%call
    Encrypt()%>">
    <P>Visa ID : <input type = "text" name = "txtVisaID">
    <P><input type = "submit">
    </form>


    </BODY>
    </HTML>


  2. #2
    srinu Guest

    Re: Coding in asp


    if u are submitting using "post" method then u can use it as:
    ><%


    txtVisaID = request.form("txtVisaID")
    Encrypt(txtVisaID)

    >Function Encrypt(txtVisaID)
    > if txtVisaID = "1" then
    > Session("VisaID") = "aaaa"
    > elseif txtVisaID = "2" then
    > session("VisaID") = "bbbb"
    > else
    > session("VisaID") = "don't know"
    > end if
    >end Function
    >%>


    OR if u are using method as "get" the use in this way:

    txtVisaID = request.querystring("txtVisaID")

    other things remain same ....

    Srinu
    "chinkok" <ck_ng41@hotmail.com> wrote:
    >
    >how do i sent the variable which key in by user in the txtVisaID to the

    Encrypt
    >function when the user click the submit button.. psl help........ thanks
    >a lot
    >
    >
    >
    ><HTML>
    ><HEAD>
    ><META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
    ></HEAD>
    ><BODY>
    ><%
    >Function Encrypt(txtVisaID)
    > if txtVisaID = "1" then
    > Session("VisaID") = "aaaa"
    > elseif txtVisaID = "2" then
    > session("VisaID") = "bbbb"
    > else
    > session("VisaID") = "don't know"
    > end if
    >end Function
    >%>
    ><form action = "try.asp" name = "frmVisa" method = "post" onSubmit = "<%call
    >Encrypt()%>">
    ><P>Visa ID : <input type = "text" name = "txtVisaID">
    ><P><input type = "submit">
    ></form>
    >
    >
    ></BODY>
    ></HTML>
    >



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links