logo
Apr
13

MVC 5 Bootstrap 3 and Html.EditorFor Styling

MVC 5.1 has added support for HTML Attributes so that you can style the input box. Use this: 1@Html.EditorFor(model => model.MyFieldNameGoesHere, new { htmlAttributes = new { @class = "form-control" } })
Apr
2

Angular ui-Router Automatically Scrolls to ui-view

Problem: When using Angular UI-Router, the page automatically scrolls down. Solution: Add autoscroll = “false” to your ui-view: 1 <div data-ui-view autoscroll="false"></div>
Dec
2

AngularJS Format Date mm/dd/yyyy Inside ng-repeat

To format the date in an ng-repeat, you can add a built-in filter: Without formatting: Code: {{ destination.startDate }} Result: 2013-12-19T00:00:00 With formatting: Code: {{ destination.startDate | date:’shortDate’ }} Result: 12/19/13
Nov
9

AngularUI ng-grid Strip Date from DateTime Using cellFilter

Inside the ColumnDefs, add a cellFilter: { field: ‘activityStartTime’, displayName: ‘Start Time’, cellFilter: ‘date:\’shortTime\”, cellClass: ‘alignRight’ }, Original value: 2013-12-12T01:15:00 New value: 1:15 AM
Nov
8

AngularUI ng-grid Strip Time from DateTime Using cellFilter

Inside the ColumnDefs, add a cellFilter: { field: ‘activityDate’, displayName: ‘Date’, cellFilter: ‘date:\’MM/dd/yyyy\”, cellClass: ‘alignRight’ }, Original value: 2013-12-12T01:15:00 New value: 12/12/2013
Nov
6

AngularUI ng-grid Format Currency Using cellFilter

Inside the ColumnDefs, add a cellFilter: { field: ‘cost’, displayName: ‘cost’, cellFilter: ‘currency’, cellClass: ‘alignRight’ }, Original value: 4.25 New value: $4.25
Oct
3

.NET MVC 5 – Jquery DatePicker with an EditorTemplate and a Partial View

I recently needed to add a jQuery datepicker to my startdate and enddate fields. I decided to create an editor template so that I could reuse this anywhere. Step 1 – Add References: Make sure you have included all the jquery/jqueryui references. Step 2 – Create the EditorTemplates folder: Create a folder called EditorTemplates under the Views/Shared folder. Step 3 – Create the Editor...
Sep
20

VS 2012 T4 Template Code Gen Stored Proc from SQL Server 2008 Sample

I have been working on trying to use the T4 Templates to Code Gen stored procs, DTO/Model classes, and Enterprise Library 5.0 data access layer. I thought I’d post these so people have an example. There are bits and pieces out there, but not a whole lot of basic samples. They say you can include the T4 in your existing projects, and it will automatically update all the database changes. For...
Jul
16

How to Backup Your WordPress Website

Found a pretty comprehensive tutorial on how to backup your WordPress website with either the WordPress import/export function or using cPanel. http://www.noupe.com/wordpress/how-to-backup-your-wordpress-website.html
Jul
10

.NET Separate Address, City, State, and Zip

In this scenario, I was importing an Excel spreadsheet, and I was provided an address in the following format: Street, City, State, Zip I needed to strip each one out so that I could store them in separate fields in the database. 123456789'My datarowview and datatable For Each drvMyDataRowViewName In dtMyDataTableName.DefaultView 'Set the results of the SeparateFullAddressFunction to an array Dim...
Jul
9

.NET Gridview TemplateField Change Boolean to Yes or No

When you bind boolean data to a gridview, and you wish to change the 1 or 0 to something meaningful such as Yes or No, try the following: 12345678   <asp:GridView ID="MyFancyGridviewName" runat="server" AutoGenerateColumns="False" >         <Columns>             <asp:TemplateField...
Jul
8

Developers’ Blog Network is Now Live

Over the years, I have looked for sites that would list quality blogs about programming/development – especially when I was trying to learn something new.  However, I have only found a few here and there.  I’d often have to slog through the search results to find some useful sites.  My intention is to gather up these useful sites to minimize the time wasted filtering through the junk. So, I started...
Jul
6

Install WordPress Locally on Windows with Xampp

Found this great site that walks you through the steps of setting up WordPress on a Windows machine using Xampp. http://wpmu.org/install-wordpress-locally-on-windows-with-xampp/   If you encounter any problems, you might want to check out this site, as it documents one person’s problems (and solutions) when trying to get Xampp to play nicely with...
Jul
2

SSRS Formatting: Remove Date from DateTime

When writing reports, sometimes you need to remove the date and just view the time….perhaps in the case of an appointment time, or a manager is checking up on his/her employees because they didn’t finish something on time. 1) Make sure that your column is a textbox.  If not drag a textbox from the toolbox into the cell. 2) Right-click textbox, and choose ‘Text Box...
Jun
30

PHPMyAdmin/MySQL Error: “You probably tried to upload too large file” when trying to import database

Yesterday, I was attempting to backup and restore a local copy of my WordPress database on a Windows 7 64 bit machine running Xampp. Since I was working locally, I am the master of my universe (ok, Super Admin), and I can do whatever I want.  I was able to increase the upload size and successfully import the .sql file. Here are the instructions: 1) Find your php.ini file (for me, it was where I installed...

« Previous Entries

logo
©  2014 Tropical Coding    |    Contact Us