Member Avatar
CriticalError

I got this code to show my blogger feed:

   <legend><h3>Blog Feed</h3></legend>
  @if (ds.Tables.Count > 0)
  {
      foreach (DataRow row in ds.Tables[6].Rows)
      {

       <p><a href="@row[5]" target="_blank"><br /><b>@row[5]</b></a></p>

              <p>@ds.Tables[9].Columns[1]</p>                                          


          }
      }

The problem is that the link displays correctly like http://blog.thecodingguys.net/2012/08/iis-404-file-or-directory-not-found-403.html but the link text also displays the url it should display the article title, however that is in table1 column 0.

Then I want a short descritpion of that which would go in <p></p> but that is also in table[9] and column 1 how can I get these values/ Been fighting this for 2 days..Currently this line:

<p>@ds.Tables[9].Columns[1]</p>

Just says content_Text (which is the column name, but I need the text!)

You telling it to display the same thing as the href because you are referring to the same section of your dataTable

<p><a href="@row[5]" target="_blank"><br /><b>@row[5]</b></a></p>

If @row[5] is the URL for the link it won't suddenly also be the name of the article. If it is in position 0 in the table surely you should enter @row[0]?
For the description you should still be asking for the correct row column combination, e.g. ds.Tables[9].Rows[a][b] where a and b are the row and column to extract. You are simply asking for the column of the table so all can provide you with is the column name.