| |
KB Article |
|
|
Bryan Valencia
|
1. Easy SQL Server Backup Script
Learn how to make an easy SQL Server Script that will automatically back up all your databases in a simple way.
|
 Code |
 KB Post |
 57 Hits
|
 DBA, Databases, & Data
|
Bryan Valencia
|
2. Using Web Safe Fonts in CSS
If you are editing the stylesheet in Visual Web Developer, and you access the font-family dropdown, Microsoft shows 3 common web-safe fonts and then every font in your system.
This is dumb. Most of us designers have many, many fonts that the average web browsing public has never heard of.
Therefore, I present this list of Web Safe Fonts. Use this list in the font-family settings to achieve the effect you want, with maximum web compatibility.
|
 KB Post
 1903 Hits
|
 Website Design & Hosting
|
Bryan Valencia
|
3. ASP.NET Cheat Sheet
Here's some copy-and-paste code that I use weekly. Bookmark it and save yourself hours!
|
 KB Post
 2140 Hits
|
 VB.Net Language
|
Bryan Valencia
|
4. Which Development Tool would YOU use?
Maybe I'm cynical, but as a developer meeting with a prospective client to gather requirements, I always wait for that one "gotcha" that turns a simple, straightforward project into a potential daymare.
35 months ago, and updated 34 months ago
(2 Comments
, last by lowster11 )
|
 KB Post
 2297 Hits
|
 Coding & OO
|
Bryan Valencia
|
5. Consuming an RSS feed in ASP.NET
Using this quickie code snippet, you can attach an ASP:Gridview to an external RSS Feed.
All you need to accomplish this is the URL of a usable feed.
|
 Code
 6228 Hits
|
 C# (Visual C# & VS.Net)
|
Bryan Valencia
|
6. General SQL Optimization Tips
In this article, you will be shown a few generic methods to optimize your SQL queries. This information is not database-specific (other than in a few places) and should apply to any SQL based database.
|
 KB Post
 2216 Hits
|
 DBA, Databases, & Data
|
Bryan Valencia
|
7. Windows could not start the SQL Server (SQLEXPRESS) on Local Computer. ... service-specific error code -2146885628
Error: Windows could not start the SQL Server (SQLEXPRESS) on Local Computer. For more information, review the System Event Log. If this is a non-Microsoft service, contact the service vendor, and refer to service-specific error code -2146885628.
The Solution: Opened the "properties" dialog for the service, and on the Log On tab, changed the user from "This Account" to "Local System Account". Started the service, and bingo.
40 months ago, and updated 28 months ago
(4 Comments
, last by Anonymous )
|
 Error
 10792 Hits
|
 DBA, Databases, & Data
|
Bryan Valencia
|
8. Geolocation: Step by Step
Think globally, act locally. How many times have you needed to determine the geographic distance between two places? This tutorial will show you how to accomplish just that.
All data and functions exist in a SQL Server Database, and can be used in VB.NET, C#.NET, Paradox, Delphi, or any other language that can call a database function.
40 months ago, and updated 40 months ago
(3 Comments
, last by mprestwood )
|
 Article
 4994 Hits
|
 DBA, Databases, & Data
|
Bryan Valencia
|
9. Using a Legacy Windows DLL in ASP.NET
This article will show how to access a function in a legacy COM dll from a ASP.NET web page. By legacy I mean a dll that is not a .NET managed code dll (a Win32 DLL).
|
 KB Post
 3458 Hits
|
 C# (Visual C# & VS.Net)
|
Bryan Valencia
|
10. Using GenericIdentity for Cross Platform Authentication in the .NET framework
When designing a WinForms application, the most straightforward way to authenticate a user is using NTLM or Active Directory using WindowsIdentity.GetCurrent. Over the Internet, you can use the whole ASP.Net security setup with Membership.GetUser. The GenericPrincipal object works well when you deploy to a mixed web/WinForms environment. See new GenericIdentity.
|
 KB Post
 4129 Hits
|
 C# (Visual C# & VS.Net)
|
Bryan Valencia
|
11. Connection Strings, Web.Config, and the Development Environment
There is a way to configure your ASP.NET website with one configuration for your internal development environment and another for your online website - and still be able to publish your site without hand editing the web.config.
|
 KB Post
 1977 Hits
|
 Website Design & Hosting
|
Bryan Valencia
|
12. SHORTCUT ICON
Get rid of the boring default icon on your website. Add a custom icon! Most browsers support .ico and the most popular ones will show any standard web image.
Follow this easy step by step to add one to your web page or site.
Example: This is Prestwood.com's icon. 
(2 Comments
, last by SomeYahoo )
|
 Code
 3022 Hits
|
 Website Design & Hosting
|
Bryan Valencia
|
13. View. Print. Handheld. Make your site work on any media.
There is no need to manually control the rendering of your site to
alter layout. There is an easy CSS based feature that can be used to
format your entire site for whatever options you need.
In this article we will see how to make the same site render
automatically for screen, print, and handheld. There are other media
types that can be used, but these will be the most common for daily use.
|
 KB Post
 2795 Hits
|
 Website Design & Hosting
|
Bryan Valencia
|
14. Don't Overlook Robots.txt
When designing websites, all developers are required to manage not only the content of the site, but the indexing of the site as well. Robots.txt is a powerful tool you can use to make sure your projects are listed in search engines as effectively as possible.
|
 Tip
 2293 Hits
|
 Website Design & Hosting
|
Bryan Valencia
|
15. Getting Website Root Directory in C# ASP.NET
This code shows how to ask the webserver where the site's root directory is, and how to convert a relative path (like /Uploads) to the full filesystem path. This will work across environments (i.e. Development/QA/Production).
53 months ago, and updated 43 months ago
(1 Comments
, last by Anonymous )
|
 Code
 6160 Hits
|
 C# (Visual C# & VS.Net)
|
Bryan Valencia
|
16. Programattically Adding Content to Web Pages in C#
Visual web developer offers a few different ways to add dynamic content to a web page. This will help you choose which one is right for your application.
In General, there are Data-Aware components, Labels, and PlaceHolders.
|
 Article
 2283 Hits
|
 C# (Visual C# & VS.Net)
|
Bryan Valencia
|
17. Send Email Using C#
This code snippet will send a very quick email. Note that this code will not work as-is. You need to have valid email accounts and a valid email server to send a real email.
You need to add: using System.Net.Mail;
55 months ago, and updated 55 months ago
|
 Code
 2562 Hits
|
 Coding & OO
|
Bryan Valencia
|
18. A 10 Minute C# Console Application Quick Start
This will show how to make a "hello world" console application in Visual Studio 2008 with C#. Let VS.Net do the work and create a new console application using the menu. Use Console.WriteLine and Console.ReadLine for simple input and output.
55 months ago, and updated 53 months ago
|
 Article
 6343 Hits
|
 C# (Visual C# & VS.Net)
|
Bryan Valencia
|
19. Regex
Console application shows some common uses of Regular Expressions (REGEX) to match and recursively replace text in strings.
55 months ago, and updated 54 months ago
|
 KB Post
 2778 Hits
|
 Coding & OO
|
Bryan Valencia
|
20. Regular Expressions Cheat Sheet
A collection of regular expressions that validate and parse common user data.
57 months ago, and updated 55 months ago
|
 KB Post
 1816 Hits
|
 Coding & OO
|
Bryan Valencia
|
21. MSSQL Update Trigger Example
This tutorial shows how you would create a trigger in Microsoft SQL Server 2005/2008 that will date/timestamp a column named last_updated everytime any data in the row is updated.
This example assumes a primary key that includes 3 fields.
5 years ago, and updated 52 months ago
(1 Comments
, last by mprestwood )
|
 Code
 12847 Hits
|
 DBA, Databases, & Data
|
Bryan Valencia
|
22. Get all components in an ASPX page recursively
Retrieves an array of all the components of any given type within a starter control (such as a page, table, panel, etc.) This routine is recursive and will keep iterating down until all the embedded components are found.
This C# code can be invoked to produce an array as follows: CheckBox[] myCheckboxes = GetAllCheckboxes(Table1);
5 years ago, and updated 51 months ago
(1 Comments
, last by ASPGuy )
|
 Code
 4195 Hits
|
 C# (Visual C# & VS.Net)
|
Bryan Valencia
|
23. FileUpload
Demonstrates the code required to retreive and store a file uploaded via an ASP FileUpload object. Assumes you have a web form with a FileUpload, a button, and a label control. Also, this example stores the file uploaded into a folder named "Uploads" which is assumed to pre-exist.
5 years ago, and updated 54 months ago
|
 Code
 2833 Hits
|
 C# (Visual C# & VS.Net)
|
Bryan Valencia
|
24. How to open a URL in a pop-up window.
Every now and then you want a link to open not only in a new browser, but you may want to give the new window the appearance of a pop-up window.
This ASP/Javascript method gives you a lot of control and is easy to figure out and implement.
5 years ago, and updated 46 months ago
(1 Comments
, last by Wes )
|
 KB Post
 14211 Hits
|
 C# (Visual C# & VS.Net)
|
Bryan Valencia
|
25. Sending email from C#.NET in 5 lines of code.
First, you must add the System.Net.Mail namespace to your project. There are 2 objects we use to send the email, a MailMessage, and an SMTPClient. This code works from C# projects or from ASP.NET projects. Make sure your mail server is set to relay messages for whoever might be sending the message. In my case my webserver is sending through my exchange server so I had to tell exchange to relay for my webserver.
|
 Code
 3021 Hits
|
 C# (Visual C# & VS.Net)
|