locked
ASP.NET: How to distribute objects (xap files) dynamicaly in runtime RRS feed

  • Question

  • Hello,

    In my application I download some xml data file from some information center, add to this xml file (in aspx.cs) the column with images and all together I pass to the GridView in aspx file.

    The same I want to do with xap (Silverlight) files - I need to add them to the GridView according to the data context, but unfortunatelly there is a problem - object doesn't have an object.Attributes like image does.

    Here is my code for adding images (gvCurrency is a GridView):

     

        for (int i = 0; i < currency.Count; i++)

        {

          Image image = new Image();

          image.Attributes.Add("src", "Images/Currency/" + xdoc.GetElementsByTagName("CURRENCYCODE")[i].InnerText + ".gif");

          image.Attributes.Add("height", "15px");

          image.Attributes.Add("width", "21px");

          gvCurrency.Rows[i].Cells[0].Controls.Add(image);

        }

    Is it possible to solve the problem?

    Thanks.

    • Moved by edhickey Monday, August 1, 2011 2:31 PM (From:.NET 4: Windows Workflow Foundation)
    Saturday, July 30, 2011 9:32 PM

All replies

  • Hi,

     

    You posted this in a Windows Workflow forum, so we don't have the expertise here to answer you.  Please ask this over at http://forums.asp.net so that you will reach a more relevant set of experts and you can get an answer to your question.

    Ed


    Ed Hickey http://blogs.msdn.com/b/edhickey/archive/2010/04/21/how-to-post-effectively-in-forums.aspx
    Monday, August 1, 2011 2:31 PM