Stream Database Photo as ASPX page...
10
This snippet allows an aspx page (c#) to accept URL parameters to allow styles or script to be dynamically appended to the rendered page.
I wrote this simple snippet to allow one of our vendors to accept a style override so that their application would morph into something more closely resembling our own portal application. Please see screenshots for clarification.
Original Vendor Application
Vendor Application with Style Override via URL
I wrote this simple snippet to allow one of our vendors to accept a style override so that their application would morph into something more closely resembling our own portal application. Please see screenshots for clarification.
Original Vendor Application
Vendor Application with Style Override via URL
9
Description:
Call one of the overloaded functions and a you will have a randomly generated password.
Generate() - Will generate a password 13 or (more/less) characters in length ranging from A-Z a-z 0-9 and other characters such as @ # %... etc.
Generate(ByVal AsciiMin As Integer, ByVal AsciiMax As Integer)
Generate(ByVal AsciiMin As Char, ByVal AsciiMax As Char) - Allows you to set your ASCII range if you wish not to include number for example.
Generate(ByVal ExcludeValues As String()) - Works like Generate() buts characters passed in the array will not be used to generate the password.
Generate(ByVal AsciiMin As Integer, ByVal AsciiMax As Integer, ByVal ExcludeValues As String())
Generate(ByVal AsciiMin As Char, ByVal AsciiMax As Char, ByVal ExcludeValues As String()) - Works like Generate(ByVal AsciiMin As Integer, ByVal AsciiMax As Integer) & Generate(ByVal AsciiMin As Char, ByVal AsciiMax As Char), but allows you to also exclude characters that you do not wish the generator to use.
UPDATE
03/06/2006: Included use of Phill64's TrueRandom2 class for generating random numbers. Also overloaded the constructor so that a length can be set for the password, if the length is not set the default is set to 13.
Call one of the overloaded functions and a you will have a randomly generated password.
Generate() - Will generate a password 13 or (more/less) characters in length ranging from A-Z a-z 0-9 and other characters such as @ # %... etc.
Generate(ByVal AsciiMin As Integer, ByVal AsciiMax As Integer)
Generate(ByVal AsciiMin As Char, ByVal AsciiMax As Char) - Allows you to set your ASCII range if you wish not to include number for example.
Generate(ByVal ExcludeValues As String()) - Works like Generate() buts characters passed in the array will not be used to generate the password.
Generate(ByVal AsciiMin As Integer, ByVal AsciiMax As Integer, ByVal ExcludeValues As String())
Generate(ByVal AsciiMin As Char, ByVal AsciiMax As Char, ByVal ExcludeValues As String()) - Works like Generate(ByVal AsciiMin As Integer, ByVal AsciiMax As Integer) & Generate(ByVal AsciiMin As Char, ByVal AsciiMax As Char), but allows you to also exclude characters that you do not wish the generator to use.
UPDATE
03/06/2006: Included use of Phill64's TrueRandom2 class for generating random numbers. Also overloaded the constructor so that a length can be set for the password, if the length is not set the default is set to 13.
9
The easiest way to give columns in a DataGrid the look you want is to use a DataGridTableStyle and to add a GridColumnStyle for each column in the grid.
8
This could be used for any type of simple hash checking. It could also be used to store a "password" that had to be verified. This code is completely managed.
7
Have you ever tried to use Color.Blue.ToString and gotten undesired results?
Or have you ever tried to save a color to an INI and not be able to reproduce it the next time around?
The methods below will help you in your conquest of converting the Color structure to HTML (#FF0000) and back to a Color structure again.
Or have you ever tried to save a color to an INI and not be able to reproduce it the next time around?
The methods below will help you in your conquest of converting the Color structure to HTML (#FF0000) and back to a Color structure again.
7
This little number will allow the contents of other pages to be included or embedded into the rendered HTML of an aspx page. Using the WebClient class from the .NET framework, you can conditionally load pages, even manipulate the HTML before it is rendered and in this example, fill in forms and execute javascript actions.
The following example shows how to auto-login to an Exchange Server - this was something requested for inclusion into our portal, but I left out the logic that pulls/decrypts the real password - for obvious reasons.
Enjoy!
~Jeremy
The following example shows how to auto-login to an Exchange Server - this was something requested for inclusion into our portal, but I left out the logic that pulls/decrypts the real password - for obvious reasons.
Enjoy!
~Jeremy
6
An all in one function that formats a given file's Size from bytes to gB.
6
I use something similar to this in an application named Shock 3. It provides you with your own Custom settings that can handle your own Custom types as well.
6
This class is a MySQL database access wrapper. It can:
- Connect to a MySQL server
- Execute SQL queries and retrieve single value results or return result rows into arrays
- Return the last inserted table row identifier, the number of result rows and the number of affected rows
- Count the number of executed queries
- Lock and unlock tables
- Escape text literal values or like patterns
- Retrieve database access errors
- Connect to a MySQL server
- Execute SQL queries and retrieve single value results or return result rows into arrays
- Return the last inserted table row identifier, the number of result rows and the number of affected rows
- Count the number of executed queries
- Lock and unlock tables
- Escape text literal values or like patterns
- Retrieve database access errors
6
This snippet generates a secure hash string using VB.NET









