WebSupergoo.ABCpdf10 exception "Illegal characters in path" - vb.net

I am trying to re-build an old .NET Visual Basic application I have inherited that uses WebSupergoo.ABCpdf10 (ABCpdf, Version=10.1.2.5). I am getting an exception "Illegal characters in path", ultimately thrown by the method System.IO.Path.CheckInvalidPathChars. However, this is called by the external code, so I have little control over it. The stack trace is as follows:
[ArgumentException: Illegal characters in path.]
System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional) +12831187
System.IO.Path.Combine(String path1, String path2) +34
WebSupergoo.ABCpdf10.Internal.Gecko.GeckoRpc.GetABCGeckoPath(String currLoc, String installDir) +378
WebSupergoo.ABCpdf10.Internal.Gecko.WorkerPool.AddRef(HtmlManagedOptions managedOptions) +332
WebSupergoo.ABCpdf10.Internal.Gecko.AddUrlProgress.Start(Boolean readAsync) +91
WebSupergoo.ABCpdf10.Internal.Gecko.DocAddGecko.AddUrl(String url) +1260
WebSupergoo.ABCpdf10.Internal.Gecko.DocAddGecko.AddHtml(String html) +290
WebSupergoo.ABCpdf10.Doc.AddUrlHtml(String urlOrHtml, Boolean isHtml, Boolean paged, Int32 width, Boolean disableCache) +251
WebSupergoo.ABCpdf10.Doc.AddImageHtml(String html, Boolean paged, Int32 width, Boolean disableCache) +49
GI.Platform.Core.Business.PdfDocument.AddHtml(String html, Int32 browserWidth, PageOrientation pageOrientation, Boolean paged) in C:\Users\MartinVaughan\Documents\Development\GI Platform\original-platform\GI.Platform.Core\Business\PDFDocument.vb:168
GI.Platform.UI.Legacy.UserControls.Admin.ReportGeneration.btnGPIBasicReportPdf_Click(Object sender, EventArgs e) in C:\Users\MartinVaughan\Documents\Development\GI Platform\original-platform\GI.Platform.UI\UserControls\Admin\ManageRegistration\ReportGeneration.ascx.vb:234
System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) +121
System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +108
System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +12
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +15
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +9859004
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1696
The method GI.Platform.Core.Business.PdfDocument.AddHtml is ours and passes an HTML-formatted string. Thereafter, the methods are external (part of the WebSupergoo package). Our method calls AddImageHtml, which appears to call AddUrlHtml.
I have stripped all URLs out of the HTML string (as I thought this might be the problem). I have also stripped out any characters I thought might be dubious. The HTML string is now (indentation added here for readability):
<html>
<head>
</head>
<body>
<table cellpadding='5' cellspacing='0' border='0' width='100%'>
<tr>
<td rowspan='3' width='350'></td>
<td class='titleCell'>GPI™ Datasheet</td>
</tr>
<tr>
<td class='nameCell'>User Name</td>
</tr>
<tr>
<td class='dateCell'>Generated on 13/09/2022</td>
</tr>
</table>
<br />
<table cellpadding='0' cellspacing='0' border='0' width='90%' class='data' align='center'>
<tr class='header'>
<th class='centerAlign'>Dimension/Sub-Dimension</th>
<th class='centerAlign'>Type</th>
<th class='centerAlign'>Rank</th>
</tr>
<tr class='dimension'>
<th class='leftAlign'>
<b>Incremental - Radical</b>
</th>
<th class='leftAlign'>
<b>Incremental</b>
</th>
<th class='centerAlign'>
<b>3</b>
</th>
</tr>
<tr>
<td class='leftAlign'>Evolutionary - Revolutionary</td>
<td class='leftAlign'>Evolutionary</td>
<td class='centerAlign'>2</td>
</tr>
<tr>
<td class='leftAlign'>Practical - Conceptual</td>
<td class='leftAlign'>Practical</td>
<td class='centerAlign'>3</td>
</tr>
<tr>
<td class='leftAlign'>Rational - Intuitive</td>
<td class='leftAlign'>Rational</td>
<td class='centerAlign'>4</td>
</tr>
<tr class='dimension'>
<th class='leftAlign'>
<b>Focused - Flexible</b>
</th>
<th class='leftAlign'>
<b>Focused</b>
</th>
<th class='centerAlign'>
<b>4</b>
</th>
</tr>
<tr>
<td class='leftAlign'>Outcome - Spontaneous</td>
<td class='leftAlign'>Outcome</td>
<td class='centerAlign'>4</td>
</tr>
<tr>
<td class='leftAlign'>Conscientious - Cursory</td>
<td class='leftAlign'>Conscientious</td>
<td class='centerAlign'>5</td>
</tr>
<tr>
<td class='leftAlign'>Perfectionist - Pragmatic</td>
<td class='leftAlign'>Perfectionist</td>
<td class='centerAlign'>2</td>
</tr>
<tr class='dimension'>
<th class='leftAlign'>
<b>Extraversion - Introversion</b>
</th>
<th class='leftAlign'>
<b>Introversion</b>
</th>
<th class='centerAlign'>
<b>3</b>
</th>
</tr>
<tr>
<td class='leftAlign'>Outgoing - Reserved</td>
<td class='leftAlign'>Reserved</td>
<td class='centerAlign'>5</td>
</tr>
<tr>
<td class='leftAlign'>Asserting - Accepting</td>
<td class='leftAlign'>Accepting</td>
<td class='centerAlign'>1</td>
</tr>
<tr>
<td class='leftAlign'>Fun Loving - Serious-Minded</td>
<td class='leftAlign'>Serious-Minded</td>
<td class='centerAlign'>5</td>
</tr>
<tr>
<td class='leftAlign'>Socially Assured - Socially Uncertain</td>
<td class='leftAlign'>Socially Uncertain</td>
<td class='centerAlign'>2</td>
</tr>
<tr class='dimension'>
<th class='leftAlign'>
<b>Collectivist - Individualist</b>
</th>
<th class='leftAlign'>
<b>Individualist</b>
</th>
<th class='centerAlign'>
<b>4</b>
</th>
</tr>
<tr>
<td class='leftAlign'>Affiliative - Unaffiliative</td>
<td class='leftAlign'>Unaffiliative</td>
<td class='centerAlign'>5</td>
</tr>
<tr>
<td class='leftAlign'>Trusting - Questioning</td>
<td class='leftAlign'>Questioning</td>
<td class='centerAlign'>3</td>
</tr>
<tr>
<td class='leftAlign'>Conforming - Dissenting</td>
<td class='leftAlign'>Dissenting</td>
<td class='centerAlign'>5</td>
</tr>
<tr>
<td class='leftAlign'>Modest - Assuming</td>
<td class='leftAlign'>Assuming</td>
<td class='centerAlign'>3</td>
</tr>
<tr class='dimension'>
<th class='leftAlign'>
<b>At Ease - Ill-at Ease</b>
</th>
<th class='leftAlign'>
<b>Ill-at Ease</b>
</th>
<th class='centerAlign'>
<b>2</b>
</th>
</tr>
<tr>
<td class='leftAlign'>Relaxed - Tense</td>
<td class='leftAlign'>Tense</td>
<td class='centerAlign'>1</td>
</tr>
<tr>
<td class='leftAlign'>Placid - Discontented</td>
<td class='leftAlign'>Discontented</td>
<td class='centerAlign'>5</td>
</tr>
<tr>
<td class='leftAlign'>Optimistic - Pessimistic</td>
<td class='leftAlign'>Pessimistic</td>
<td class='centerAlign'>3</td>
</tr>
<tr>
<td class='leftAlign'>Confident - Self-Conscious</td>
<td class='leftAlign'>Confident</td>
<td class='centerAlign'>1</td>
</tr>
<tr class='dimension'>
<th class='leftAlign'>
<b>Disciplined - Impulsive</b>
</th>
<th class='leftAlign'>
<b>Disciplined</b>
</th>
<th class='centerAlign'>
<b>3</b>
</th>
</tr>
<tr class='dimension'>
<th class='leftAlign'>
<b>Driving - Measured</b>
</th>
<th class='leftAlign'>
<b>Measured</b>
</th>
<th class='centerAlign'>
<b>1</b>
</th>
</tr>
<tr>
<td class='leftAlign'>Persuasive - Consensual</td>
<td class='leftAlign'>Consensual</td>
<td class='centerAlign'>1</td>
</tr>
<tr>
<td class='leftAlign'>Ambitious - Contented</td>
<td class='leftAlign'>Ambitious</td>
<td class='centerAlign'>2</td>
</tr>
<tr>
<td class='leftAlign'>Energetic - Paced</td>
<td class='leftAlign'>Paced</td>
<td class='centerAlign'>3</td>
</tr>
</table>
<br />
<table cellpadding='0' cellspacing='0' border='0' align='center'>
<tr>
<td class='copyrightCell'>© 2022 Glowinkowski International Limited</td>
</tr>
</table>
</body>
</html>
(Note: I have removed the link to the CSS file and an image with a URL, as I thought these might be creating the problem).
Still getting the exception!
Could anyone throw any light on this?
Edit
Looking at the WebSupergoo documentation at https://www.websupergoo.com/helppdfnet/default.htm?page=source%2f5-abcpdf%2fdoc%2f1-methods%2faddimagehtml.htm they note that:
Using the MSHTML, ABCGecko and ABCWebKit engines, ABCpdf saves this HTML into a temporary file and renders the file using a 'file://' protocol specifier. So this is a convenience function - it doesn't offer any performance enhancements. Sometimes the IIS users do not have full access to the temp directory. This is determined by the system setup you have on your machine. If this is the case you will get errors returned. So if you are working from ASP you may find that you need to enable access to the temp directory for the ASPNET user, the IUSR_MACHINENAME user or the IWAM_MACHINENAME user.
This may be the root cause of the problem, in which case, my question would translate to how do I enable access in my Visual Studio build?.

Related

How do I render numbers like 4999 to $4,999.00 in datatables?

If the data source is from an existed DOM, rather than some JSON variable. How do I convert the numbers like 4999 to $4,999.00 in datatables?
I don't know what kind of options should be passed to the main function.
$('#example').DataTable(
{
// need help on this
}
);
Here is the code:
$(document).ready(function() {
//Only needed for the filename of export files.
//Normally set in the title tag of your page.
document.title='Simple DataTable';
// DataTable initialisation
$('#example').DataTable(
{
}
);
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link href="https://cdn.datatables.net/1.10.12/css/dataTables.bootstrap.min.css" rel="stylesheet"/>
<script src="https://cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js"></script>
<a class="btn btn-success" style="float:left;margin-right:20px;" href="https://codepenio/collection/XKgNLN/" target="_blank">Other examples on Codepen</a>
<table id="example" class="table table-striped table-bordered" cellspacing="0" width="100%">
<thead>
<tr>
<th>Order</th>
<th>Description</th>
<th>Deadline</th>
<th>Status</th>
<th>Amount</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Alphabet puzzle</td>
<td>2016/01/15</td>
<td>Done</td>
<td data-order="1000">1000</td>
</tr>
<tr>
<td>2</td>
<td>Layout for poster</td>
<td>2016/01/31</td>
<td>Planned</td>
<td data-order="1834">1834</td>
</tr>
<tr>
<td>3</td>
<td>Image creation</td>
<td>2016/01/23</td>
<td>To Do</td>
<td data-order="1500">1500</td>
</tr>
<tr>
<td>4</td>
<td>Create font</td>
<td>2016/02/26</td>
<td>Done</td>
<td data-order="1200">1200</td>
</tr>
<tr>
<td>5</td>
<td>Sticker production</td>
<td>2016/02/18</td>
<td>Planned</td>
<td data-order="2100">2100</td>
</tr>
<tr>
<td>6</td>
<td>Glossy poster</td>
<td>2016/03/17</td>
<td>To Do</td>
<td data-order="899">899</td>
</tr>
<tr>
<td>7</td>
<td>Beer label</td>
<td>2016/05/28</td>
<td>Confirmed</td>
<td data-order="2499">2499</td>
</tr>
<tr>
<td>8</td>
<td>Shop sign</td>
<td>2016/04/19</td>
<td>Offer</td>
<td data-order="1099">1099</td>
</tr>
<tr>
<td>9</td>
<td>X-Mas decoration</td>
<td>2016/10/31</td>
<td>Confirmed</td>
<td data-order="1750">1750</td>
</tr>
<tr>
<td>10</td>
<td>Halloween invite</td>
<td>2016/09/12</td>
<td>Planned</td>
<td data-order="400">400</td>
</tr>
<tr>
<td>11</td>
<td>Wedding announcement</td>
<td>2016/07/09</td>
<td>To Do</td>
<td data-order="299">299</td>
</tr>
<tr>
<td>12</td>
<td>Member pasport</td>
<td>2016/06/22</td>
<td>Offer</td>
<td data-order="149">149</td>
</tr>
<tr>
<td>13</td>
<td>Drink tickets</td>
<td>2016/11/01</td>
<td>Confirmed</td>
<td data-order="199">199</td>
</tr>
<tr>
<td>14</td>
<td>Album cover</td>
<td>2017/03/15</td>
<td>To Do</td>
<td data-order="4999">4999</td>
</tr>
<tr>
<td>15</td>
<td>Shipment box</td>
<td>2017/02/08</td>
<td>Offer</td>
<td data-order="1399">1399</td>
</tr>
<tr>
<td>16</td>
<td>Wooden puzzle</td>
<td>2017/01/11</td>
<td>Done</td>
<td data-order="1000">1000</td>
</tr>
<tr>
<td>17</td>
<td>Fashion Layout</td>
<td>2016/01/30</td>
<td>Planned</td>
<td data-order="1834">1834</td>
</tr>
<tr>
<td>18</td>
<td>Toy creation</td>
<td>2016/01/10</td>
<td>To Do</td>
<td data-order="1550">1550</td>
</tr>
<tr>
<td>19</td>
<td>Create stamps</td>
<td>2016/02/26</td>
<td>Done</td>
<td data-order="1220">1220</td>
</tr>
<tr>
<td>20</td>
<td>Sticker design</td>
<td>2017/02/18</td>
<td>Planned</td>
<td data-order="2100">2100</td>
</tr>
<tr>
<td>21</td>
<td>Poster rock concert</td>
<td>2017/04/17</td>
<td>To Do</td>
<td data-order="899">899</td>
</tr>
<tr>
<td>22</td>
<td>Wine label</td>
<td>2017/05/28</td>
<td>Confirmed</td>
<td data-order="2799">2799</td>
</tr>
<tr>
<td>23</td>
<td>Shopping bag</td>
<td>2017/04/19</td>
<td>Offer</td>
<td data-order="1299">1299</td>
</tr>
<tr>
<td>24</td>
<td>Decoration for Easter</td>
<td>2017/10/31</td>
<td>Confirmed</td>
<td data-order="1650">1650</td>
</tr>
<tr>
<td>25</td>
<td>Saint Nicolas colorbook</td>
<td>2017/09/12</td>
<td>Planned</td>
<td data-order="510">510</td>
</tr>
<tr>
<td>26</td>
<td>Wedding invites</td>
<td>2017/07/09</td>
<td>To Do</td>
<td data-order="399">399</td>
</tr>
<tr>
<td>27</td>
<td>Member pasport</td>
<td>2017/06/22</td>
<td>Offer</td>
<td data-order="249">249</td>
</tr>
<tr>
<td>28</td>
<td>Drink tickets</td>
<td>2017/11/01</td>
<td>Confirmed</td>
<td data-order="199">199</td>
</tr>
<tr>
<td>29</td>
<td>Blue-Ray cover</td>
<td>2018/03/15</td>
<td>To Do</td>
<td data-order="1999">1999</td>
</tr>
<tr>
<td>30</td>
<td>TV carton</td>
<td>2019/02/08</td>
<td>Offer</td>
<td data-order="1369">1369</td>
</tr>
</tbody>
</table>
You can use the createdCell() callback, inside DataTables' columnDefs initializazion option.
Inside the callback, you have access to the <td> element of the created cell and to its data, so you can manipulate both in the way that you prefer.
In this fiddle I changed the shown data format using the Intl.NumberFormat() api:
$(document).ready(function() {
// Only needed for the filename of export files.
// Normally set in the title tag of your page.
document.title = 'Simple DataTable';
// DataTable initialisation
$('#example').DataTable({
columnDefs: [{
targets: 4, // <-- this is the target column
createdCell: function(cell, cellData, rowData, rowIndex, colIndex) {
const formattedContent = new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'USD'
}).format(cellData);
cell.innerHTML = formattedContent;
},
}]
});
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link href="https://cdn.datatables.net/1.10.12/css/dataTables.bootstrap.min.css" rel="stylesheet" />
<script src="https://cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js"></script>
<a class="btn btn-success" style="float:left;margin-right:20px;" href="https://codepenio/collection/XKgNLN/" target="_blank">Other examples on Codepen</a>
<table id="example" class="table table-striped table-bordered" cellspacing="0" width="100%">
<thead>
<tr>
<th>Order</th>
<th>Description</th>
<th>Deadline</th>
<th>Status</th>
<th>Amount</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Alphabet puzzle</td>
<td>2016/01/15</td>
<td>Done</td>
<td data-order="1000">1000</td>
</tr>
<tr>
<td>2</td>
<td>Layout for poster</td>
<td>2016/01/31</td>
<td>Planned</td>
<td data-order="1834">1834</td>
</tr>
<tr>
<td>3</td>
<td>Image creation</td>
<td>2016/01/23</td>
<td>To Do</td>
<td data-order="1500">1500</td>
</tr>
<tr>
<td>4</td>
<td>Create font</td>
<td>2016/02/26</td>
<td>Done</td>
<td data-order="1200">1200</td>
</tr>
<tr>
<td>5</td>
<td>Sticker production</td>
<td>2016/02/18</td>
<td>Planned</td>
<td data-order="2100">2100</td>
</tr>
<tr>
<td>6</td>
<td>Glossy poster</td>
<td>2016/03/17</td>
<td>To Do</td>
<td data-order="899">899</td>
</tr>
<tr>
<td>7</td>
<td>Beer label</td>
<td>2016/05/28</td>
<td>Confirmed</td>
<td data-order="2499">2499</td>
</tr>
<tr>
<td>8</td>
<td>Shop sign</td>
<td>2016/04/19</td>
<td>Offer</td>
<td data-order="1099">1099</td>
</tr>
<tr>
<td>9</td>
<td>X-Mas decoration</td>
<td>2016/10/31</td>
<td>Confirmed</td>
<td data-order="1750">1750</td>
</tr>
<tr>
<td>10</td>
<td>Halloween invite</td>
<td>2016/09/12</td>
<td>Planned</td>
<td data-order="400">400</td>
</tr>
<tr>
<td>11</td>
<td>Wedding announcement</td>
<td>2016/07/09</td>
<td>To Do</td>
<td data-order="299">299</td>
</tr>
<tr>
<td>12</td>
<td>Member pasport</td>
<td>2016/06/22</td>
<td>Offer</td>
<td data-order="149">149</td>
</tr>
<tr>
<td>13</td>
<td>Drink tickets</td>
<td>2016/11/01</td>
<td>Confirmed</td>
<td data-order="199">199</td>
</tr>
<tr>
<td>14</td>
<td>Album cover</td>
<td>2017/03/15</td>
<td>To Do</td>
<td data-order="4999">4999</td>
</tr>
<tr>
<td>15</td>
<td>Shipment box</td>
<td>2017/02/08</td>
<td>Offer</td>
<td data-order="1399">1399</td>
</tr>
<tr>
<td>16</td>
<td>Wooden puzzle</td>
<td>2017/01/11</td>
<td>Done</td>
<td data-order="1000">1000</td>
</tr>
<tr>
<td>17</td>
<td>Fashion Layout</td>
<td>2016/01/30</td>
<td>Planned</td>
<td data-order="1834">1834</td>
</tr>
<tr>
<td>18</td>
<td>Toy creation</td>
<td>2016/01/10</td>
<td>To Do</td>
<td data-order="1550">1550</td>
</tr>
<tr>
<td>19</td>
<td>Create stamps</td>
<td>2016/02/26</td>
<td>Done</td>
<td data-order="1220">1220</td>
</tr>
<tr>
<td>20</td>
<td>Sticker design</td>
<td>2017/02/18</td>
<td>Planned</td>
<td data-order="2100">2100</td>
</tr>
<tr>
<td>21</td>
<td>Poster rock concert</td>
<td>2017/04/17</td>
<td>To Do</td>
<td data-order="899">899</td>
</tr>
<tr>
<td>22</td>
<td>Wine label</td>
<td>2017/05/28</td>
<td>Confirmed</td>
<td data-order="2799">2799</td>
</tr>
<tr>
<td>23</td>
<td>Shopping bag</td>
<td>2017/04/19</td>
<td>Offer</td>
<td data-order="1299">1299</td>
</tr>
<tr>
<td>24</td>
<td>Decoration for Easter</td>
<td>2017/10/31</td>
<td>Confirmed</td>
<td data-order="1650">1650</td>
</tr>
<tr>
<td>25</td>
<td>Saint Nicolas colorbook</td>
<td>2017/09/12</td>
<td>Planned</td>
<td data-order="510">510</td>
</tr>
<tr>
<td>26</td>
<td>Wedding invites</td>
<td>2017/07/09</td>
<td>To Do</td>
<td data-order="399">399</td>
</tr>
<tr>
<td>27</td>
<td>Member pasport</td>
<td>2017/06/22</td>
<td>Offer</td>
<td data-order="249">249</td>
</tr>
<tr>
<td>28</td>
<td>Drink tickets</td>
<td>2017/11/01</td>
<td>Confirmed</td>
<td data-order="199">199</td>
</tr>
<tr>
<td>29</td>
<td>Blue-Ray cover</td>
<td>2018/03/15</td>
<td>To Do</td>
<td data-order="1999">1999</td>
</tr>
<tr>
<td>30</td>
<td>TV carton</td>
<td>2019/02/08</td>
<td>Offer</td>
<td data-order="1369">1369</td>
</tr>
</tbody>
</table>

image uploaded to database but unable to display the image

Im using the simpleform to upload the file image
<tr>
<td align="right">Photo</td>
<td><input type="file"size="30" name="photo" /></td>
</tr>
then here is my php file..Im using mysql_fetch_array
row[6] is my photo...
// retrieves a row data and returns it as an associative array
while($row=mysql_fetch_array($result)){
echo "<table border='1' align='center' class='table_background'>
<tr>
<td align='left' width=100>UserName=</td>
<td align='left' width='400'></td>
</tr>
<tr>
<td align='left' width=100>Title=</td>
<td align='left' width='400'>$row[1]</td>
</tr>
<tr>
<td align='left'width=100>Category=</td>
<td align='left'width='400'>$row[2]</td>
</tr>
<tr>
<td align='left'width=100>Description=</td>
<td align='left'width='400'>$row[3]</td>
</tr>
<tr>
<td align='left'width=100>State=</td>
<td align='left'width='400'>$row[4]</td>
</tr>
<tr>
<td align='left'width=100>Photo=</td>
<td align='left'width='400'>$row[5]</td>
</tr>
<tr>
<td align='left'width=100>Date=</td>
<td align='left'width='200'>$row[6]</td>
</tr>
<br>
}
<br>
<br>
</table>";
}
In my database I use Blob as the type of image ... the image is successful upload to my database
but just display the image file name...
blob is a string so you have to display id a bit different
echo '<img src="data:image/jpeg;base64,'.base64_encode( $row[6] ).'"/>';

vb.net: Get data from Xelement <table></table>

I have loaded a Xelement from my SharePoint site.
Dim elTable2 As XElement = <table border="1" id="table2" style="font-size:1em;border-collapse:collapse;display:inline;width:100%">
<tbody>
<tr class="ms-rteTableHeaderRow-default" style="text-align:center">
<th class="ms-rteTableHeaderFirstCol-default">​</th>
<th class="ms-rteTableHeaderOddCol-default">LAN IP​</th>
<th class="ms-rteTableHeaderEvenCol-default">Username​</th>
<th class="ms-rteTableHeaderOddCol-default">Password​</th>
<th class="ms-rteTableHeaderEvenCol-default">Port​</th>
<th class="ms-rteTableHeaderOddCol-default">OS​</th>
<th class="ms-rteTableHeaderEvenCol-default">Extra Info​</th>
</tr>
<tr class="ms-rteTableOddRow-default" style="text-align:center">
<th class="ms-rteTableFirstCol-default">Netasq</th>
<td class="ms-rteTableOddCol-default"></td>
<td class="ms-rteTableEvenCol-default"></td>
<td class="ms-rteTableOddCol-default">​</td>
<td class="ms-rteTableEvenCol-default">​</td>
<td class="ms-rteTableOddCol-default">​</td>
<td class="ms-rteTableEvenCol-default">​</td>
</tr>
</tbody>
</table>
The table will have an unknown number of rows. Can I loop trough all the rows and check what data is in the first column?
You could leverage Html Agility Pack for that purpose. It is a .NET code library that allows to parse HTML content and supports plain XPATH or XSLT.
Example
Dim table As XElement = <table border="1" id="table2" style="font-size:1em;border-collapse:collapse;display:inline;width:100%">
<tbody>
<tr class="ms-rteTableHeaderRow-default" style="text-align:center">
<th class="ms-rteTableHeaderFirstCol-default">​Val</th>
<th class="ms-rteTableHeaderOddCol-default">LAN IP​</th>
<th class="ms-rteTableHeaderEvenCol-default">Username​</th>
<th class="ms-rteTableHeaderOddCol-default">Password​</th>
<th class="ms-rteTableHeaderEvenCol-default">Port​</th>
<th class="ms-rteTableHeaderOddCol-default">OS​</th>
<th class="ms-rteTableHeaderEvenCol-default">Extra Info​</th>
</tr>
<tr class="ms-rteTableOddRow-default" style="text-align:center">
<td class="ms-rteTableFirstCol-default">Netasq</td>
<td class="ms-rteTableOddCol-default"></td>
<td class="ms-rteTableEvenCol-default"></td>
<td class="ms-rteTableOddCol-default">​</td>
<td class="ms-rteTableEvenCol-default">​</td>
<td class="ms-rteTableOddCol-default">​</td>
<td class="ms-rteTableEvenCol-default">​</td>
</tr>
</tbody>
</table>
Dim html = New HtmlDocument()
html.LoadHtml(table.ToString())
For Each row In html.DocumentNode.SelectNodes("//tr[position()>1]") 'XPath expression to select table rows and skip table header
Dim cell As HtmlNode = row.SelectSingleNode("td[1]") 'Get cell for first column
Console.WriteLine(cell.InnerText)
Next

Selenium - pulling data from a website table assign to variable

I am attempting to pull a value and a header (string) from a website, but unable to find the element using selenium.
My Code
I used Firebug to get the XPath and this is what it determined:
//*[#id="DimensionForm"]/p[1]/table/tbody/tr[3]/td[3]
Code
Dim Right as double
Dim Marker as string
Marker = selenium.findElementByXPath("//*[#id="DimensionForm"]/p[1]/table/tbody/tr[2]/td[3]").getAttribute("value")
Right = selenium.findElementByXPath("//*[#id="DimensionForm"]/p[1]/table/tbody/tr[3]/td[3]").getAttribute("value")
HTML CODE
<form id="DimensionForm" name="validate" action="Dimension" method="post">
<div style="margin-top: 7px"></div>
<p><table width="100%" cellspacing="0" border="0" cellpadding="0" class="element">
<tr>
<td> </td><td class="formtitlenobg" colspan="6" align='right'>
AREA DIMENSIONS (AREA A) <span class='quote'> Front</span> 25.24</td>
</tr>
<tr align="right">
<td class="tablerowlightgreen" width=10> </td>
<th class="formtitle" width=250 align="left">Property</th>
<th class="formtitle" width=50>Check</th> <th class="formtitle" width=75>Front</th>
<th class="formtitle" width=75>Center</th><th class="formtitle" width=75>Left</th>
<th class="formtitle" width=120>Right</th>
<th class="formtitle" width=100>Total</th>
<td class="tablerow" width=50> </td>
<td class="tablerow"> </td>
</tr>
<tr align="right" nowrap>
<td> </td>
<td class="table" align="left"><strong>
Property O</strong></td>
<td class="table">+</td>
<td class="table">10</td>
<td class="table">12</td>
<td class="table"><strong>12</strong></td>
<td class="table"><strong><font class="front">
100</font></strong></td>
<td class="table">120</td>
<td> </td>
<td> </td>
</tr>
</table></td>
</tr></table>
You have incorrectly nested quotes:
selenium.findElementByXPath("//*[#id="DimensionForm"]/p[1]/table/tbody/tr[2]/td[3]")
Perhaps you meant:
selenium.findElementByXPath("//*[#id='DimensionForm']/p[1]/table//tr[2]/td[3]")
Note the single-quotes in the second line!

Select Link after fetching label in frony of it

i am writing a selenium java code and at a particular webpage i want to select a link from a
group of links where each link has an emebeded text within a table. How can i select particular
link at this situtation. for eg.
run title--text 1
run title--text 2
run title--text 3
how can select specific run link for a specific title text? the text is not a label rather it is
just simple text on the webpage.
i am using the following code:
verify.text("text 1");
it will only verify the presence of text ut it wont go towarads the link as linkof every execution is named RUN. so it will identify the corresponding run link?
The HTML code for the above is:
<HTML>
<HEAD>
<TITLE>TEST</TITLE>
</HEAD>
<BODY>
<div align="center"><table class="module" width="630">
<tr>
<th class="banner" width="70">ACTION</th>
<th class="banner" width="560">REPORT TEMPLATE</th>
</tr>
<tr>
<td class="modulenav" width="70">
<table class="innermodule" width="100%">
<tr><td class="moduleNav"><a class="listingLink"
href="www.abc.com/">Run</a></td></tr>
<tr><td class="moduleNav"><a class="listingLink"
href="www.zxc.com">UnShare</a></td></tr>
</table>
</td>
<td>
<table class="innerModule" width="100%">
<tr>
<td class="label" width="70">Title</td>
<td width="490"><span class="listingHead">Incident Performance by Priority</span></td>
</tr>
<tr>
<td class="Label" width="70">Description</td>
<td class="listing"></td>
</tr>
<tr>
<td class="Label" width="70">Owner</td>
<td class="listing"> Software Engineer Tel: </td>
</tr>
<tr>
<td class="Label" width="70">Shared With</td>
<td class="listing">
Software Engineer Tel: <br>
</td>
</tr>
<tr>
<td class="label">Report Type</td>
<td class="listing">Performance by Priority</td>
</tr>
</table>
</td>
</tr>
<tr><td class="tableRuleNavy" colspan="2"></td></tr>
<tr>
<td class="modulenav" width="70">
<table class="innermodule" width="100%">
<tr><td class="moduleNav"><a class="listingLink"
href="www.abc.com">Run</a></td></tr>
<tr><td class="moduleNav"><a class="listingLink"
href="www.cxd.com">UnShare</a></td></tr>
</table>
</td>
<td>
<table class="innerModule" width="100%">
<tr>
<td class="label" width="70">Title</td>
<td width="490"><span class="listingHead">Incident Trend Analysis Report</span></td>
</tr>
<tr>
<td class="Label" width="70">Description</td>
<td class="listing"></td>
</tr>
<tr>
<td class="Label" width="70">Owner</td>
<td class="listing">Software Engineer Tel: </td>
</tr>
<tr>
<td class="Label" width="70">Shared With</td>
<td class="listing">
Software Engineer Tel: <br>
</td>
</tr>
<tr>
<td class="label">Report Type</td>
<td class="listing">Trend Analysis</td>
</tr>
</table>
</td>
</tr>
<tr><td class="tableRuleNavy" colspan="2"></td></tr>
<tr>
<td class="modulenav" width="70">
<table class="innermodule" width="100%">
<tr><td class="moduleNav"><a class="listingLink"
href="www.sdfds.com">Run</a></td></tr>
<tr><td class="moduleNav"><a class="listingLink"
href="www.asdg.com">UnShare</a></td></tr>
</table>
</DIV>
</td>
</BODY>
</HTML>