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. Using Resources in Asp.Net 2.0. Problem.

Using Resources in Asp.Net 2.0. Problem.

Scheduled Pinned Locked Moved ASP.NET
graphicshelptutorialcsharpasp-net
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.
  • S Offline
    S Offline
    shapper
    wrote on last edited by
    #1

    Hello, I am trying to use my resources, in an Asp.Net 2.0 web site, but I am having a few problems. 1) Using with an Image I have an ASP:Image (ID=MyImage) in my aspx code. In my aspx.vb code I placed the following code: MyImage = Resources.Global.MyImage I get the error: Value of type 'System.Drawing.Bitmap' cannot be converted to 'System.Web.UI.WebControls.Image'. 2) Retrieving its URL Very often I use commercial control where I need to define an Image URL. Here is an example: something.Image.URL = "assets/images/MyImage.jpg" What I need to do is get the URL of my image: something.Image.URL = [URL of resource MyImage] Could someone explain how to solve these 2 problems? I have been looking around but I was not able to find the solution. Thanks, Miguel

    M 1 Reply Last reply
    0
    • S shapper

      Hello, I am trying to use my resources, in an Asp.Net 2.0 web site, but I am having a few problems. 1) Using with an Image I have an ASP:Image (ID=MyImage) in my aspx code. In my aspx.vb code I placed the following code: MyImage = Resources.Global.MyImage I get the error: Value of type 'System.Drawing.Bitmap' cannot be converted to 'System.Web.UI.WebControls.Image'. 2) Retrieving its URL Very often I use commercial control where I need to define an Image URL. Here is an example: something.Image.URL = "assets/images/MyImage.jpg" What I need to do is get the URL of my image: something.Image.URL = [URL of resource MyImage] Could someone explain how to solve these 2 problems? I have been looking around but I was not able to find the solution. Thanks, Miguel

      M Offline
      M Offline
      mikailcetinkaya
      wrote on last edited by
      #2

      i am no geek on resources but for first problem; make an aspx page that reads the given parameter matched resource . some page like readresource.aspx?param=Picture1 ... it will be a page like database blob picture to image page. but you wont use db but the resource. maybe this solves your both problems... for such a page sample search codeproject with "database image" or "resource image" with only asp.net selected on detail search Mikail Çetinkaya . The C# DEveloper

      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