Results 1 to 6 of 6

Thread: Asp

  1. #1

    Thread Starter
    Hyperactive Member DaveR's Avatar
    Join Date
    Mar 2001
    Location
    Ireland
    Posts
    268

    Question Asp

    In my ASP page , I'm creating a table and filling it with database values.After this i'm creating some hyperlinks.
    Problems is the hyperlinks always appear before the table, when i'm expecting them to appear after it.
    If anyone has seen this kind of thing before , let me know.


    Also , can someone explain the following line :
    Response.Write "<a href=""" & Request.ServerVariables("SCRIPT_NAME") & "?pagenum=" & pagecnt & """>Last Page</a>"


    I know its a hyperlink , but where do the servervariables come in.
    SCRIPT_NAME has not been defined anywhere else.???
    any ideas???

    Cheers
    DaveR

  2. #2
    New Member
    Join Date
    May 2001
    Posts
    3
    hi
    i think you have not closed the asp delimiters properly.
    it is not a good idea of giving the hyperlink using response.write.
    end the asp script and use <a href>.
    there is no way hyperlink will come before the table as you specified.

    coming to server variables,those are the collection of request object.
    Request.ServerVariables("SCRIPT_NAME") will give the address of the present page.that means the link is given to the same page.

    bye
    sridhar

  3. #3
    Lively Member harsoni's Avatar
    Join Date
    Oct 2000
    Posts
    118

    Talking

    for the first question put the hyperlink in one TR TD and the table where ur populating with data from database in other TR TD.

    <TABLE>
    <TR>
    <TD>Here is the urls...</TD>
    </TR>
    <TR>
    <TD><TABLE>here u populate</TABLE></TD>
    </TR>
    </TABLE>


    For the second question...

    Request.ServerVariables("SCRIPT_NAME") gives the script name
    i.e VBscript or javascript u r using

    Hope this helps
    Sonia

  4. #4

    Thread Starter
    Hyperactive Member DaveR's Avatar
    Join Date
    Mar 2001
    Location
    Ireland
    Posts
    268
    cheers, that seemed to do the trick
    One more question

    How do I pass a value between 2 different asp pages in the same project.??
    I'm using interdev to design them.
    DaveR

  5. #5
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    Assuming this is a value you want passed behind the scenes, you can use a hidden text box and write the variable to the text box on the server side, before it is sent to the browser.

    If you don't care about the value being visible, use a querystring.
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

  6. #6
    Lively Member harsoni's Avatar
    Join Date
    Oct 2000
    Posts
    118

    Lightbulb

    There r two ways to pass a value from 1 asp to another..

    1. pass in as a url
    2. store the value in the form variable and submit to other asp

    Sonia

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width