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. Displaying Images dynamically

Displaying Images dynamically

Scheduled Pinned Locked Moved ASP.NET
graphicsquestionhtmldesignsysadmin
3 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.
  • C Offline
    C Offline
    chakran
    wrote on last edited by
    #1

    Hi, How to display images dynamically? am displaying Radio buttons dynamically.My requirement is beside each radio button I want to show image. Am reading data from Xml file and make it in Dataset then using DataView am reading one by one. pls see the code what I have written: DataSet dsPaymentMethod = new DataSet(); dsPaymentMethod.ReadXml(strFilePath); DataView dvForDisplay = dsPaymentMethods.Tables[0].DefaultView; for (int i = 0; i < dvForDisplay.Count; i++) { rdb = new HtmlInputRadioButton(); img = new Bitmap(5, 5); rdb.ID = dvForDisplay[i]["RadioButtonId"].ToString(); rdb.Value = dvForDisplay[i]["PaymentGateway"].ToString(); img = System.Drawing.Image.FromFile(@"D:\VSSNew\SourceCode\Telefonica.MSNOut\Telefonica.MSNOut.UI\images\logos\cards\visa.gif"); panelInternational.Controls.Add(rdb); } I have written above code. but it only showing Radio buttons not images. How can I display images? Is there any server side contorl equal to this html ; Thanks

    G C 2 Replies Last reply
    0
    • C chakran

      Hi, How to display images dynamically? am displaying Radio buttons dynamically.My requirement is beside each radio button I want to show image. Am reading data from Xml file and make it in Dataset then using DataView am reading one by one. pls see the code what I have written: DataSet dsPaymentMethod = new DataSet(); dsPaymentMethod.ReadXml(strFilePath); DataView dvForDisplay = dsPaymentMethods.Tables[0].DefaultView; for (int i = 0; i < dvForDisplay.Count; i++) { rdb = new HtmlInputRadioButton(); img = new Bitmap(5, 5); rdb.ID = dvForDisplay[i]["RadioButtonId"].ToString(); rdb.Value = dvForDisplay[i]["PaymentGateway"].ToString(); img = System.Drawing.Image.FromFile(@"D:\VSSNew\SourceCode\Telefonica.MSNOut\Telefonica.MSNOut.UI\images\logos\cards\visa.gif"); panelInternational.Controls.Add(rdb); } I have written above code. but it only showing Radio buttons not images. How can I display images? Is there any server side contorl equal to this html ; Thanks

      G Offline
      G Offline
      greekius
      wrote on last edited by
      #2

      set text property of radio button to html code like "dingdangdong "

      1 Reply Last reply
      0
      • C chakran

        Hi, How to display images dynamically? am displaying Radio buttons dynamically.My requirement is beside each radio button I want to show image. Am reading data from Xml file and make it in Dataset then using DataView am reading one by one. pls see the code what I have written: DataSet dsPaymentMethod = new DataSet(); dsPaymentMethod.ReadXml(strFilePath); DataView dvForDisplay = dsPaymentMethods.Tables[0].DefaultView; for (int i = 0; i < dvForDisplay.Count; i++) { rdb = new HtmlInputRadioButton(); img = new Bitmap(5, 5); rdb.ID = dvForDisplay[i]["RadioButtonId"].ToString(); rdb.Value = dvForDisplay[i]["PaymentGateway"].ToString(); img = System.Drawing.Image.FromFile(@"D:\VSSNew\SourceCode\Telefonica.MSNOut\Telefonica.MSNOut.UI\images\logos\cards\visa.gif"); panelInternational.Controls.Add(rdb); } I have written above code. but it only showing Radio buttons not images. How can I display images? Is there any server side contorl equal to this html ; Thanks

        C Offline
        C Offline
        ChrisKo 0
        wrote on last edited by
        #3

        Maybe take a look at [^] ??

        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