Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7989381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T12:44:16+00:00 2026-06-04T12:44:16+00:00

The following code: public virtual string LookupFeatureImages(string ProductID) { string[] features; using (SqlConnection con

  • 0

The following code:

    public virtual string LookupFeatureImages(string ProductID)
    {
        string[] features;
        using (SqlConnection con = new SqlConnection(DB.GetDBConn()))
        {
            con.Open();
            string query = @"SELECT     ExtensionData5
            FROM         Product
            WHERE     (ProductID = @ProductID)";
            using (IDataReader dr = DB.GetRS(query, new SqlParameter[] { new SqlParameter("@ProductID", ProductID) }, con))
            {
                if (dr.Read())
                {
                    if (String.IsNullOrEmpty(dr["ExtensionData5"].ToString()))
                    {
                        return "";
                    }
                    else
                    {
                        features = dr["ExtensionData5"].ToString().Split(',');
                    }
                }
                else
                {
                    return "";
                }
            }
            con.Close();
        }
       string s = "<script type=\"text/javascript\" src=\"skins/Skin_1/jquery.fancybox-1.3.1/fancybox/jquery.mousewheel-3.0.2.pack.js\"></script><script type=\"text/javascript\" src=\"skins/Skin_1/jquery.fancybox-1.3.1/fancybox/jquery.fancybox-1.3.1.js\"></script><link rel=\"stylesheet\" type=\"text/css\" href=\"skins/Skin_1/jquery.fancybox-1.3.1/fancybox/jquery.fancybox-1.3.1.css\" media=\"screen\" />";
       s += "<script type=\"text/javascript\">$(document).ready(function() {    $(\"a.iconClick\").fancybox({'hideOnContentClick': true, 'autoDimensions' : false, 'width' : 400, 'height' : 300 }); });</script>";

        s += "<table><tr>";
        for (int i = 0; i <= features.GetUpperBound(0); i++)
        {
            string name = features[i].Split(':')[0];
            bool isChecked = Boolean.Parse(features[i].Split(':')[2]);

            if (isChecked)
            {
                //s += "<td><img src=\"skins/skin_1/images/" + name + ".gif\" alt=\"" + name + "\" title=\"" + name + "\"></td>";
                s += "<td>";
                s += "<a class=\"iconClick\" rel=\"icons\" href='popup.aspx?title=" + name + "&topic=feature_" + name + "' title='" + name + "'><img src=\"skins/skin_1/images/" + name + ".gif\" alt=\"" + name + "\" title=\"" + name + "\"></a>";
                s += "</td>";

            }
        }
        s += "</tr><tr>";
        for (int i = 0; i <= features.GetUpperBound(0); i++)
        {
            string specification = features[i].Split(':')[1];
            bool isChecked = Boolean.Parse(features[i].Split(':')[2]);

            if (isChecked)
            {
                s += "<td>" + specification + "</td>";
            }
        }
        return s + "</tr></table>";
    }

Outputs HTML like this:

<table id="FeatureBox">
<tbody>
<tr>
<td>
<div id="productInfoGrid">
<p id="ProductIconsTitle">Product Features At-A-Glance (<a href=
"JavaScript:newPopup('t-featureicons.aspx');">key</a>)</p>
<script src=
"skins/Skin_1/jquery.fancybox-1.3.1/fancybox/jquery.mousewheel-3.0.2.pack.js"
type="text/javascript">
</script><script src=
"skins/Skin_1/jquery.fancybox-1.3.1/fancybox/jquery.fancybox-1.3.1.js"
type="text/javascript">
</script><script type="text/javascript">
$(document).ready(function() {       $("a.iconClick").fancybox({'hideOnContentClick': true, 'autoDimensions' : false, 'width' : 400, 'height' : 300 }); });
</script>
<table>
<tbody>
<tr>
<td><a title="classification" href=
"popup.aspx?title=classification&amp;topic=feature_classification"
rel="icons" class="iconClick"><img title="classification" alt=
"classification" src=
"skins/skin_1/images/classification.gif"></a></td>
<td><a title="maxcapacityadults" href=
"popup.aspx?title=maxcapacityadults&amp;topic=feature_maxcapacityadults"
rel="icons" class="iconClick"><img title="maxcapacityadults" alt=
"maxcapacityadults" src=
"skins/skin_1/images/maxcapacityadults.gif"></a></td>
<td><a title="maxcapacitychildren" href=
"popup.aspx?title=maxcapacitychildren&amp;topic=feature_maxcapacitychildren"
rel="icons" class="iconClick"><img title="maxcapacitychildren" alt=
"maxcapacitychildren" src=
"skins/skin_1/images/maxcapacitychildren.gif"></a></td>
<td><a title="maxloadcapacity" href=
"popup.aspx?title=maxloadcapacity&amp;topic=feature_maxloadcapacity"
rel="icons" class="iconClick"><img title="maxloadcapacity" alt=
"maxloadcapacity" src=
"skins/skin_1/images/maxloadcapacity.gif"></a></td>
<td><a title="numberofinflatablechambers" href=
"popup.aspx?title=numberofinflatablechambers&amp;topic=feature_numberofinflatablechambers"
rel="icons" class="iconClick"><img title=
"numberofinflatablechambers" alt="numberofinflatablechambers" src=
"skins/skin_1/images/numberofinflatablechambers.gif"></a></td>
<td><a title="packagingsize" href=
"popup.aspx?title=packagingsize&amp;topic=feature_packagingsize"
rel="icons" class="iconClick"><img title="packagingsize" alt=
"packagingsize" src=
"skins/skin_1/images/packagingsize.gif"></a></td>
<td><a title="sizeinflated" href=
"popup.aspx?title=sizeinflated&amp;topic=feature_sizeinflated" rel=
"icons" class="iconClick"><img title="sizeinflated" alt=
"sizeinflated" src="skins/skin_1/images/sizeinflated.gif"></a></td>
<td><a title="standard" href=
"popup.aspx?title=standard&amp;topic=feature_standard" rel="icons"
class="iconClick"><img title="standard" alt="standard" src=
"skins/skin_1/images/standard.gif"></a></td>
<td><a title="weight" href=
"popup.aspx?title=weight&amp;topic=feature_weight" rel="icons"
class="iconClick"><img title="weight" alt="weight" src=
"skins/skin_1/images/weight.gif"></a></td>
</tr>
<tr class="featureNames">
<td>III,B</td>
<td>1</td>
<td>0</td>
<td>130 kg</td>
<td>3</td>
<td>79 x 28 x 51 cm</td>
<td>305 x 84 cm</td>
<td>ISO 6185-1</td>
<td>10.6 kg</td>
</tr>
</tbody>
</table>
<div class="c1"></div>
</div>
</td>
</tr>
</tbody>
</table>

How can I change the output to DIVs?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T12:44:17+00:00Added an answer on June 4, 2026 at 12:44 pm

    I am not too sure as to what you are asking. If you want your code to be displayed in div instead of table, tr and td, that can be easily achieved from within the code. Simply remove the table and tr tags from the output and replace all td tags with div tags. That should effectively remove any table formatting and change everything to div.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Considering following code public class A { public static void main(String[] args) { new
I have the following code(simplified). public class OrderProcessor { public virtual string PlaceOrder(string test)
I have the following code: class Pet { public: virtual string speak() const {
I have the following code: public virtual void Initialise() { this.AddHeader(SystemContext, this.UserSettings.SystemContext); } public
Consider the following code: class A { public: virtual void f() throw ( int
Consider the following C++ code: class A { public: virtual void f()=0; }; int
The following code: public interface ISomeData { IEnumerable<string> Data { get; } } public
Consider the following code: public class MyClass { public static string MyStaticMethod() { //string
i have the following code: public static void Serialize() { List<string> dirs = FileHelper.GetFilesRecursive(fileDirectoryPath);
If I have the following code: public class MyClass { public string myName {

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.