I.T. Discussion Community!
Bryan Valencia -Collapse +Expand
Employee
-Collapse +Expand
Bryan.V
-Collapse +Expand Profile
Member Info
Member Narration

POSTS:
MB Posts (23)
KB Posts (27)◄╣
KB Comments (4)
Blog (2 Topics)

KBPOSTSBYTYPE:
Tech Articles
Code Snippets (9)

Search Bryan.V:

Advanced
Bryan Valencia's Knowledge Base
Bryan Valencia


About Me

Bryan Valencia is the author of millions of lines of code and writes for PrestwoodBoards and Visual Studio Journey on-line magazines.




Knowledge Base Posts

More...
  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.

Posted to KB Topic: Microsoft SQL Server
6 years ago
(1 Comments , last by Theessay.S )

Code

KB Post
Nothing New Since Your Last Visit
6494
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.

Posted to KB Topic: Website Design
8 years ago

KB Post
Nothing New Since Your Last Visit
8827
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!

Posted to KB Topic: WebForms (ASP.Net)
9 years ago

KB Post
Nothing New Since Your Last Visit
6496
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. 

Posted to KB Topic: Coding & OO
9 years ago, and updated 9 years ago
(2 Comments , last by lowster11 )

KB Post
Nothing New Since Your Last Visit
7691
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.

Posted to KB Topic: WebForms Coding Tasks
9 years ago
(2 Comments , last by Hanvi.j )

Code
Nothing New Since Your Last Visit
18515
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.

Posted to KB Topic: SQL Servers
9 years ago

KB Post
Nothing New Since Your Last Visit
7514
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.

Posted to KB Topic: Microsoft SQL Server
9 years ago, and updated 8 years ago
(9 Comments , last by Pervez.J )

Error
Nothing New Since Your Last Visit
39489
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.

Posted to KB Topic: SQL Servers
9 years ago, and updated 9 years ago
(3 Comments , last by mprestwood )

Article
Nothing New Since Your Last Visit
16157
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). 

Posted to KB Topic: WebForms Coding Tasks
10 years ago

KB Post
Nothing New Since Your Last Visit
11037
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.

Posted to KB Topic: WebForms Coding Tasks
10 years ago

KB Post
Nothing New Since Your Last Visit
14590
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.

Posted to KB Topic: Website Scripting
10 years ago

KB Post
Nothing New Since Your Last Visit
7703
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. 

Posted to KB Topic: Website Design
10 years ago
(11 Comments , last by Himani.M )

Code
Nothing New Since Your Last Visit
19596
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.

Posted to KB Topic: Cascading Style Sheets (CSS)
10 years ago
(5 Comments , last by alvina.a )

KB Post
Nothing New Since Your Last Visit
11922
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.

Posted to KB Topic: Website Scripting
10 years ago
(1 Comments , last by Merle.R )

Tip
Nothing New Since Your Last Visit
9498
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).

Posted to KB Topic: WebForms Coding Tasks
11 years ago, and updated 10 years ago
(3 Comments , last by Dean.M )

Code
Nothing New Since Your Last Visit
17909
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.
Posted to KB Topic: WebForms Coding Tasks
11 years ago

Article
Nothing New Since Your Last Visit
8341
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;

Posted to KB Topic: General .Net Concepts
11 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
9662
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.

Posted to KB Topic: C#
11 years ago, and updated 11 years ago

Article
Nothing New Since Your Last Visit
14880
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.
Posted to KB Topic: General .Net Concepts
11 years ago, and updated 11 years ago

KB Post
Nothing New Since Your Last Visit
9289
Hits

Coding & OO

Bryan Valencia
20. Regular Expressions Cheat Sheet

A collection of regular expressions that validate and parse common user data.

Posted to KB Topic: Programming
11 years ago, and updated 11 years ago

KB Post
Nothing New Since Your Last Visit
4114
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.

Posted to KB Topic: MS SQL 2005
11 years ago, and updated 10 years ago
(1 Comments , last by mprestwood )

Code
Nothing New Since Your Last Visit
21935
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);
Posted to KB Topic: WebForms Coding Tasks
11 years ago, and updated 10 years ago
(3 Comments , last by GaganDeep.S )

Code
Nothing New Since Your Last Visit
10328
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.

Posted to KB Topic: WebForms Coding Tasks
11 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
6626
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.
Posted to KB Topic: WebForms Coding Tasks
11 years ago, and updated 10 years ago
(1 Comments , last by Wes )

KB Post
Nothing New Since Your Last Visit
49543
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.

Posted to KB Topic: WebForms Coding Tasks
11 years ago

Code
Nothing New Since Your Last Visit
7221
Hits

C# (Visual C# & VS.Net)
More...
Follow PrestwoodBoards on: 


©1995-2019 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech