Tiny Asp Script

01/11/2016 18:04 killer2p#1
So Today Im Giving A tiny ASP Script that can be used to look at a Characters Inventory. Yes it requires more than i have given reason its in the development section
Code:
@using WebMatrix.WebData

@* Remove this section if you are using bundling *@
@section Scripts {
    <script src="~/Scripts/jquery.validate.min.js"></script>
    <script src="~/Scripts/jquery.validate.unobtrusive.min.js"></script>
}
<style>
       table, th, td {
         border: solid 1px #bbbbbb;
         border-collapse: collapse;
         padding: 2px;
       }
    </style>

  @{
    WebSecurity.RequireAuthenticatedUser();

    Layout = "~/_SiteLayout.cshtml";
    Page.Title = "Manage Account";

    }
@{
    var Char = UrlData[0];
    var db= Database.Open("PS_GameData");
   var sqlQ = "SELECT ci.CharID,i.ItemName,ci.Bag,ci.Slot,ci.ItemUID,ci.Count,ci.Del From PS_GameData.dbo.CharItems ci inner join PS_GameDefs.dbo.Items i on ci.Type=i.Type and ci.TypeID = i.TypeID WHERE CharID=@0 and Del='0'";
   var data = db.Query(sqlQ, Char);
   }


<table>
       <thead>
           <tr>
               
               <th>Item Name</th> 
               <th>Bag Number</th>
               <th>Slot</th>
               <th>Count</th>
           </tr>
       </thead>
       <tbody>
           @foreach(var row in data){
            <tr>
                    
                   <td>@row.ItemName</td>
                   <td>@row.Bag</td>
                   <td>@row.Slot</td>
                   <td>@row.Count</td>
                   
            </tr>
           }
       </tbody>
</table>
01/11/2016 19:04 nubness#2
Approved because it's ASP. I doubt anyone will use it, but good job. Everyone is so focused on PHP, ASP is left aside.
01/11/2016 22:40 Truth1010#3
Always liked ASP since LilPro used it for Exile years back, works so well and like Nubness says, it always gets ignored and bullied by the big PHP :)
Nice release :)
01/12/2016 10:53 killer2p#4
im currently building my who site outta asp.net Granted im using .cshtml and webmatrix instead of visual studio