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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. i am passing querystring through this coding is it correct way

i am passing querystring through this coding is it correct way

Scheduled Pinned Locked Moved ASP.NET
4 Posts 3 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.
  • G Offline
    G Offline
    gopinathtamil
    wrote on last edited by
    #1

    <table><tr><td align=center><table border=0 cellpadding=0 cellspacing=0><tr><td><Img Width=100 height=100 src=Image.aspx?id=" & ds1.Tables(0).Rows(i)("imageId") & "></Img></td></tr></table></td></tr><tr><td align=center><a href=productdetailview.aspx?typeid=1&Productid=" & ds1.Tables(0).Rows(i)("productid") & ">" & ds1.Tables(0).Rows(i)("productname") & "</a></td></tr><tr><td align=center><font color=#ff6900>MRP Rs:-<strike>" & ds1.Tables(0).Rows(i)("price") & "</strike><font></td></tr><tr><td align=center><font color=green>Our Price Rs:-" & ds1.Tables(0).Rows(i)("ourprice") & "<font></td></tr></table>

    S C 2 Replies Last reply
    0
    • G gopinathtamil

      <table><tr><td align=center><table border=0 cellpadding=0 cellspacing=0><tr><td><Img Width=100 height=100 src=Image.aspx?id=" & ds1.Tables(0).Rows(i)("imageId") & "></Img></td></tr></table></td></tr><tr><td align=center><a href=productdetailview.aspx?typeid=1&Productid=" & ds1.Tables(0).Rows(i)("productid") & ">" & ds1.Tables(0).Rows(i)("productname") & "</a></td></tr><tr><td align=center><font color=#ff6900>MRP Rs:-<strike>" & ds1.Tables(0).Rows(i)("price") & "</strike><font></td></tr><tr><td align=center><font color=green>Our Price Rs:-" & ds1.Tables(0).Rows(i)("ourprice") & "<font></td></tr></table>

      S Offline
      S Offline
      SeMartens
      wrote on last edited by
      #2

      Could you be so kind to format your code a bit? It is hard to read. And please give more details about what you want to achieve.

      It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.

      G 1 Reply Last reply
      0
      • G gopinathtamil

        <table><tr><td align=center><table border=0 cellpadding=0 cellspacing=0><tr><td><Img Width=100 height=100 src=Image.aspx?id=" & ds1.Tables(0).Rows(i)("imageId") & "></Img></td></tr></table></td></tr><tr><td align=center><a href=productdetailview.aspx?typeid=1&Productid=" & ds1.Tables(0).Rows(i)("productid") & ">" & ds1.Tables(0).Rows(i)("productname") & "</a></td></tr><tr><td align=center><font color=#ff6900>MRP Rs:-<strike>" & ds1.Tables(0).Rows(i)("price") & "</strike><font></td></tr><tr><td align=center><font color=green>Our Price Rs:-" & ds1.Tables(0).Rows(i)("ourprice") & "<font></td></tr></table>

        C Offline
        C Offline
        Colin Angus Mackay
        wrote on last edited by
        #3

        I presume this is a big string you are concatenating. If this is not the case then you need to provide more context with which we can help you. You have not HTML encoded the output of the database. This leaves you vulnerable to attack. If someone manages to trick your applicaiton into storing a script in your database it will be rendered to the page and the browser will just run it.

        *Developer Day Scotland - Free community conference Delegate Registration Open

        1 Reply Last reply
        0
        • S SeMartens

          Could you be so kind to format your code a bit? It is hard to read. And please give more details about what you want to achieve.

          It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.

          G Offline
          G Offline
          gopinathtamil
          wrote on last edited by
          #4

          i need to pass two values using querystring. Dim myDataAdapter1 As SqlDataAdapter = New SqlDataAdapter("SELECT i.imageid,i.IMAGE,p.productname,p.Price,p.productid,p.ourprice FROM Product p,IMAGE i WHERE p.Typeid='1' AND i.Productid=p.Productid and p.productid in(170)", myConnection) Dim ds1 As DataSet ds1 = New DataSet myDataAdapter1.Fill(ds1, "image") Dim str As String str = "<table><tr><td align=center><table border=0 cellpadding=0 cellspacing=0><tr><td><Img Width=100 height=100 src=Image.aspx?id=" & ds1.Tables(0).Rows(i)("imageId") & "></Img></td></tr></table></td></tr><tr><td align=center> <a href=productdetailview.aspx?typeid=1&Productid=" & ds1.Tables(0).Rows(i)("productid") & " > " & ds1.Tables(0).Rows(i)("productname") & "</a></td></tr><tr><td align=center><font color=#ff6900>MRP Rs:-<strike>" & ds1.Tables(0).Rows(i)("price") & "</strike><font></td></tr><tr><td align=center><font color=green>Our Price Rs:-" & ds1.Tables(0).Rows(i)("ourprice") & "<font></td></tr></table>" Response.Write(str & "<br>") This is a dynamic creating table on vb.net...which i was mentioned on bold letters. that is called hyperlink tag which i am going to pass the value using querystring.....it correct way to mention querystring like this......

          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