Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. asp(scripting)

asp(scripting)

Scheduled Pinned Locked Moved Web Development
databasesysadmincollaborationhelpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rajiv_kadam
    wrote on last edited by
    #1

    i m displaying records from one table and while displaying i m passing the id field of project.asp to scheme.asp now my problem is that when scheme.asp does not contain the scheme for the project.asp then it should not show the hyperlink viewscheme on project.asp file. here is my code.....below

    <% opendatabase conn id=request("id") sql="select * from projectdescription where id="& id set obj=server.createobject("adodb.recordset") obj.open sql,conn,1,1 sql2="select * from schemedescription where projectid="& obj("id") set obj2=server.CreateObject("adodb.recordset") obj2.open sql,conn,1,1 if obj2("projectid")=obj("id") then response.Write("[View Project](project.asp?id=" & obj("id") & ")   ") response.Write("[View Scheme](scheme.asp?id=" & obj("id") & ")   ") response.Write("[View Team](team.asp?id=" & obj("id") & ")
    ") %>

    <% response.Write(obj("description")) %>

    ![](/images/<%=obj()" height="150" width="200" alt="Central Home Images" > <% else response.Write("[View Project](project.asp?id=" & obj("id") & ")   ") response.End() end if %>

    A 1 Reply Last reply
    0
    • R rajiv_kadam

      i m displaying records from one table and while displaying i m passing the id field of project.asp to scheme.asp now my problem is that when scheme.asp does not contain the scheme for the project.asp then it should not show the hyperlink viewscheme on project.asp file. here is my code.....below

      <% opendatabase conn id=request("id") sql="select * from projectdescription where id="& id set obj=server.createobject("adodb.recordset") obj.open sql,conn,1,1 sql2="select * from schemedescription where projectid="& obj("id") set obj2=server.CreateObject("adodb.recordset") obj2.open sql,conn,1,1 if obj2("projectid")=obj("id") then response.Write("[View Project](project.asp?id=" & obj("id") & ")   ") response.Write("[View Scheme](scheme.asp?id=" & obj("id") & ")   ") response.Write("[View Team](team.asp?id=" & obj("id") & ")
      ") %>

      <% response.Write(obj("description")) %>

      ![](/images/<%=obj()" height="150" width="200" alt="Central Home Images" > <% else response.Write("[View Project](project.asp?id=" & obj("id") & ")   ") response.End() end if %>

      A Offline
      A Offline
      Abhishek Sur
      wrote on last edited by
      #2

      I think you need to omit this response.Write("scheme.asp?id=%22%20&%20obj(%22id%22)%20&%20%22") Use an IF statement then.. .whats the problem ?? :confused::confused:

      Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


      My Latest Articles-->** Microsoft Bing MAP using Javascript
      CLR objects in SQL Server 2005
      Uncommon C# Keywords
      /xml>

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups