by Brad | Oct 26, 2011 | C#
Meh, that previous post was kind of too simple etc, so thought I’d wrap up the logic in a nice class here you go. It ccouldn’t be easier to call one example to write exceptions is [codesyntax lang=”csharp”]...
by Brad | Oct 26, 2011 | C#
Namespace to import [codesyntax lang=”csharp”] using System.Diagnostics; [/codesyntax] Code to write to the application log, sure this is super simple but sometimes that’s all you need ;) [codesyntax lang=”csharp”] const string sSource =...
by Brad | Aug 8, 2011 | C#
If you want to add records to your database using a gridview (the gridview should already have at least one record with this method), you can use the GridView FooterRow as a container to hold the controls for the user to enter new data. You will then use the...
by Brad | Aug 2, 2011 | C#
Nice class with a couple of methods to handle execution of a stored procedure with an array of parameters or a regular query and return a dataset object, all you need do is pass in the connection string when creating the connection. [codesyntax...
by Brad | Jul 15, 2011 | ASP.NET, C#
You have a DetailsView control with edit / add and all the other goodness enabled, but when adding a new record you want a non-visible field to get it’s value from another control like the SelectedValue of a GridView or a DropDownList in the InsertParameters...