ASP new bie

  • 18 years ago

    Hello! Users,
      I am new bie in asp and willing to make a site using asp script. PLease tell me how can I make links like this in ASP <http://www.domain.com/page.asp?id=page


    Please tell me step wise

  • 18 years ago

    the stuff after the ".asp" is called the querystring, and you access it like this:


    Code:
    <%
    Dim firstname
    firstname = Request.QueryString("name")
    %>


    where the URL is something like www.something.com/page.asp?name=paulfp

  • 18 years ago

    I got it but, how te file comes after ?name=paulf. now where this paulf come from or should we make the file first in asp extension and later give that filename's links to it?


    PLease can you tell me more clearly.

  • 18 years ago

    on the page preceeding you could have something like this


    Code:

    <html>
    <body>
    <a href="http://www.domain.com/page.asp?id=about">about</a>
    </body>
    </html>


    or


    Code:

    <html>
    <script langauge="javascript">
    <!--


    function setID(val) {
     document.forms[0].id.value=val;
       document.forms[0].submit();
    }


    //-->
    </script>
    <body>


    <form action="http://www.domain.com/page.asp" method="get">
    <input type="hidden" name="id" value="home">
    <input type="button" value="about" onclick="setID('about')">
    <input type="button" value="home" onclick="setID('home')">
    </form>


    </body>
    </html>



    you would then have code like paulfp posted, and you could redirect or load content from there

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“The trouble with programmers is that you can never tell what a programmer is doing until it's too late.” - Seymour Cray