Problem:
I'm new to ASP.Net and I need some guidelines where to start, and what to do? I have read couple of the articles I found on different sites. But, some are not using VB code and I'm not confident of my C# coding knowledge.
I have included a table from my database and a PHP code to help visualize what I wanted to create.
My Table
------------------------------------------------------------------------------------------
| items_id | items_name | items_description | items_price | items_quantity |
------------------------------------------------------------------------------------------
| 1 | Spoon | Shiny and Silver | 50 | 20 |
| 2 | Fork | Shiny and Silver | 50 | 20 |
| 3 | China | Clean and Polished | 90 | 20 |
------------------------------------------------------------------------------------------
PHP Code
$sql = mysql_query("SELECT * FROM tbl_items");
$productCount = mysql_num_rows($sql);
if ($productCount > 0) {
while($row = mysql_fetch_array($sql)){
$id = $row["items"];
$name = $row["items_name"];
$description = $row["items_description"];
$price = $row["items_price"];
$quantity = $row["items_quantity"];
$check_pic = 'venues/'.$id.'/'.$id.'.jpg';
if (file_exists($check_pic)) {
$img_src = 'venues/'.$id.'/'.$id.'.jpg';
} else {
$img_src = 'venues/0/0.jpg';
}
$dynamicList .= '<li class="span3">
<div class="thumbnail">
<p><b>'.$name. '</b></p><br />
<img src="'.$img_src.'" alt="" style="box-shadow: 0 2px 3px rgba(0,0,0,0.2);">
<div class="caption">
<p align="center" class="lead" style="color:#053750;"> '.$venue.'</p>
<hr />
<p><b>Description: </b> '.$description. '</p><br />
<p><b>Price: </b> '.$price. '</p><br />
<p><b>Quantity: </b> '.$quantity. '</p><br />
<p><a href="items_details.php?items_id='.$id.'" class="btn btn-info btn-block">Choose</a> </p>
</div>
</div>
</li>';
}
Some articles I have read:
Part 4: Listing Products - The ASP parts are very comprehensible but, I don't know how to replace it's connection to the database to ODBC.
Binding a generic list to a repeater - ASP.NET - The behind codes are C# and I'm having a hard time converting even with the help of C# to VB converter