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. Img at run time (Asp.net 2.0)

Img at run time (Asp.net 2.0)

Scheduled Pinned Locked Moved ASP.NET
helpcsharphtmlasp-netdesign
8 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.
  • B Offline
    B Offline
    BalasubramanianK
    wrote on last edited by
    #1

    Hi, I've given my img in master page. I can see the img at design time in master page itself. I'm using this master page in my Login.aspx. I've given the proper path for image also. But I could not get this image at run time and design time of my login page. What the problem, which I did? Anybody help me. this is my master page code

    <html>
    <body>
    <div id = "div1" runat ="server" >
    <table width=100% height=4 bgcolor=eeeeee>
    <tr valign ="middle"><td width = "20%" height ="15%">
    <img src="../Images/Currency2.jpg" border="0"/></td>
    <%--<asp:Image runat="server" ImageUrl ="~/Images/Currency2.jpg" BorderStyle = "None" />--%>
    <td width = "80%" align ="center"><I><B>BULLET - Receipt And Payment Module</B></I></td>
    </tr>
    </table>
    </div>

    Balasubramanian K.

    N S 2 Replies Last reply
    0
    • B BalasubramanianK

      Hi, I've given my img in master page. I can see the img at design time in master page itself. I'm using this master page in my Login.aspx. I've given the proper path for image also. But I could not get this image at run time and design time of my login page. What the problem, which I did? Anybody help me. this is my master page code

      <html>
      <body>
      <div id = "div1" runat ="server" >
      <table width=100% height=4 bgcolor=eeeeee>
      <tr valign ="middle"><td width = "20%" height ="15%">
      <img src="../Images/Currency2.jpg" border="0"/></td>
      <%--<asp:Image runat="server" ImageUrl ="~/Images/Currency2.jpg" BorderStyle = "None" />--%>
      <td width = "80%" align ="center"><I><B>BULLET - Receipt And Payment Module</B></I></td>
      </tr>
      </table>
      </div>

      Balasubramanian K.

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

      Try

      <img src="~/Images/Currency2.jpg" border="0" runat="server"/>

      Navaneeth How to use google | Ask smart questions

      B 1 Reply Last reply
      0
      • N N a v a n e e t h

        Try

        <img src="~/Images/Currency2.jpg" border="0" runat="server"/>

        Navaneeth How to use google | Ask smart questions

        B Offline
        B Offline
        BalasubramanianK
        wrote on last edited by
        #3

        Already I'd tried with this symbol. If I use this, I could not see at design time also. Anyother soln. Thanks

        Balasubramanian K.

        N 1 Reply Last reply
        0
        • B BalasubramanianK

          Already I'd tried with this symbol. If I use this, I could not see at design time also. Anyother soln. Thanks

          Balasubramanian K.

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

          BalasubramanianK wrote:

          Already I'd tried with this symbol.

          Made it runat=server? It will work only if runat=server is set. Could you post your directory structure? Where is this Login page resides? If you come out of the directory where login page exists, can you see the images directory? Problem is the image path. ../Images/Currency2.jpg not found from the login page. :)

          Navaneeth How to use google | Ask smart questions

          B 1 Reply Last reply
          0
          • N N a v a n e e t h

            BalasubramanianK wrote:

            Already I'd tried with this symbol.

            Made it runat=server? It will work only if runat=server is set. Could you post your directory structure? Where is this Login page resides? If you come out of the directory where login page exists, can you see the images directory? Problem is the image path. ../Images/Currency2.jpg not found from the login page. :)

            Navaneeth How to use google | Ask smart questions

            B Offline
            B Offline
            BalasubramanianK
            wrote on last edited by
            #5

            In my solution, I've two folders such as Images and MasterPages. Currency2.jpg contains in Images folder. Common.master conains in MasterPages folder. My page name is login.aspx, which does not contained in any folder. I've given my runat = server at my division itself. If I move my image from image folder to masterPage folder, It is working properly. I could not find the problem of path of the image. Because, I never typed the path directly. Using the pick up in visual studio, option I selected the file name.

            Balasubramanian K.

            N 1 Reply Last reply
            0
            • B BalasubramanianK

              In my solution, I've two folders such as Images and MasterPages. Currency2.jpg contains in Images folder. Common.master conains in MasterPages folder. My page name is login.aspx, which does not contained in any folder. I've given my runat = server at my division itself. If I move my image from image folder to masterPage folder, It is working properly. I could not find the problem of path of the image. Because, I never typed the path directly. Using the pick up in visual studio, option I selected the file name.

              Balasubramanian K.

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

              BalasubramanianK wrote:

              My page name is login.aspx, which does not contained in any folder.

              Then the image path should be Images/Currency2.jpg. Try that.

              Navaneeth How to use google | Ask smart questions

              B 1 Reply Last reply
              0
              • N N a v a n e e t h

                BalasubramanianK wrote:

                My page name is login.aspx, which does not contained in any folder.

                Then the image path should be Images/Currency2.jpg. Try that.

                Navaneeth How to use google | Ask smart questions

                B Offline
                B Offline
                BalasubramanianK
                wrote on last edited by
                #7

                If I remove ../ I cld not see at design time itself of the master page. So, basically it will not come at run time. I think that ../ should be there. I think that ../ takes me to come back one step to my project folder from the currency2.jpg.

                Balasubramanian K.

                1 Reply Last reply
                0
                • B BalasubramanianK

                  Hi, I've given my img in master page. I can see the img at design time in master page itself. I'm using this master page in my Login.aspx. I've given the proper path for image also. But I could not get this image at run time and design time of my login page. What the problem, which I did? Anybody help me. this is my master page code

                  <html>
                  <body>
                  <div id = "div1" runat ="server" >
                  <table width=100% height=4 bgcolor=eeeeee>
                  <tr valign ="middle"><td width = "20%" height ="15%">
                  <img src="../Images/Currency2.jpg" border="0"/></td>
                  <%--<asp:Image runat="server" ImageUrl ="~/Images/Currency2.jpg" BorderStyle = "None" />--%>
                  <td width = "80%" align ="center"><I><B>BULLET - Receipt And Payment Module</B></I></td>
                  </tr>
                  </table>
                  </div>

                  Balasubramanian K.

                  S Offline
                  S Offline
                  sepel
                  wrote on last edited by
                  #8

                  It may help you:

                  sepel

                  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