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.NET
  4. how to pass variable value to image control property

how to pass variable value to image control property

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netvisual-studiodesignhelp
4 Posts 4 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.
  • H Offline
    H Offline
    harithadotnet
    wrote on last edited by
    #1

    Hi I am using vs.net 2005 and asp.net 2.0 . In aspx design code i wrote the code as <% dim i as integer i="images/ga.jpg" %> now i dont want to provide src prpperty value directly. i have to give variable value how to give this plz help me ...... Thanks in advance

    Haritha

    C N N 3 Replies Last reply
    0
    • H harithadotnet

      Hi I am using vs.net 2005 and asp.net 2.0 . In aspx design code i wrote the code as <% dim i as integer i="images/ga.jpg" %> now i dont want to provide src prpperty value directly. i have to give variable value how to give this plz help me ...... Thanks in advance

      Haritha

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Why did you create a new account and ask this twice ? Your code doesn't work. You create an integer and assign a string to it. VB.NET, being crap, will probably turn your int into a string, but you'd do well not to rely on your language of choice being rubbish. Your code doesn't do anything sensible, but you can assign a variable value to the src property in your code behind, I don't see the issue. Of course, it needs to be a server control.

      Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

      1 Reply Last reply
      0
      • H harithadotnet

        Hi I am using vs.net 2005 and asp.net 2.0 . In aspx design code i wrote the code as <% dim i as integer i="images/ga.jpg" %> now i dont want to provide src prpperty value directly. i have to give variable value how to give this plz help me ...... Thanks in advance

        Haritha

        N Offline
        N Offline
        N a v a n e e t h
        wrote on last edited by
        #3

        harithadotnet wrote:

        dim i as integer i="images/ga.jpg"

        Passing string value to integer value ? How this is possible ? I am not sure that I understood your problem, are you trying to assign variable value to src of image tag ? That could be something like

        <image src=<%=i%>


        My Website | Ask smart questions

        1 Reply Last reply
        0
        • H harithadotnet

          Hi I am using vs.net 2005 and asp.net 2.0 . In aspx design code i wrote the code as <% dim i as integer i="images/ga.jpg" %> now i dont want to provide src prpperty value directly. i have to give variable value how to give this plz help me ...... Thanks in advance

          Haritha

          N Offline
          N Offline
          Nand Kumar Das
          wrote on last edited by
          #4

          :-DUse string type variable and assign it to image control property (it means take i as a string type varible) Nand Kumar Das

          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