Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2004
    Location
    India
    Posts
    56

    Smile Unanswered: Error with Request.Query String

    Dear Friends,

    I was trying to pass some variable to a asp page with following code

    Response.Write "<td>"& countdt &"<br><a href=""view_caltable.asp?yr="& yn &" &mn="& mn &" &ct="&countdt &" &name1="& nm1 &""" >" & nm1 & "</a> <br><a href=""view_caltable1.asp? prd="& yn &"&mn="&mn &" &ct="&countdt &" &name2="&nm2&"""> "& nm2 &"</td>".

    Problem is that all the varaibles are getting passed and first link view_caltable.asp is working perfectly.But second asp file "view_caltable1.asp" is not able to receive some value,

    in "view_caltable1.asp", I am using following code,

    mn=Request.QUeryString("mn")
    name_po2=Request.Querystring("name2")
    count=Request.QueryString("ct")
    prd=Request.QUeryString("yn")

    Here 'prd' is not accepting values form 'yn'
    All other varaible are accepting the values. Can anyone help in this proplem please. Is there is any limitation in passing varibale.


    Thank

    Graceson

  2. #2
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    try removing the spaces from your querystring...

    Response.Write "<td>"& countdt &"<br><a href=""view_caltable.asp?yr="& yn &"&mn="& mn &"&ct="&countdt &"&name1="& nm1 &""" >" & nm1 & "</a> <br><a href=""view_caltable1.asp?prd="& yn &"&mn="&mn &" &ct="&countdt &" &name2="&nm2&"""> "& nm2 &"</td>".

  3. #3
    Join Date
    Mar 2004
    Location
    India
    Posts
    56

    Error in query string

    I removed the space between the text, but still problem s there.But all the passing values are showing there in address bar of "View_clatable1.asp",

    eg: http://server/view_caltable1.asp?prd...&name2=Pranjal

    but it is not coming when i am using the QueryString command.

    like prd1=Request.QueryString("prd")
    here prd1 is blank

    Hopes you can solve the problem for me


    Thank you

    graceson

  4. #4
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    I'm not sure if this will solve the problem but I notice that you are missing the end </a> tag in your link,... this may be throwing things out....

  5. #5
    Join Date
    Mar 2004
    Location
    India
    Posts
    56
    Thank you for attempting my problem. Added the </a> . But that does not solve the problem. Can you suggest any other command other than Request.QueryString

    or if there is any way the clear the memory or buffur.


    thanks a lot


    graceson

  6. #6
    Join Date
    Jul 2003
    Location
    SoCal
    Posts
    721
    Where are you DIMing "prd1"? If you DIM (or implicitly declare) it inside a block of code, and then try to read it outside of that block, your object is out of the scope and destroyed.
    Last edited by Seppuku; 07-30-04 at 13:06.
    That which does not kill me postpones the inevitable.

Posting Permissions

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