|
61-80 of 3200
Previous
Next |
|
Replace All Occurrences of One String with Another String
by Patrick Tighe
|
|
Manage Errors with Sparse Line Numbering
by Bob Hiltner
|
|
GetControlHtml - Retrieving the HTML code generated by the input ASP.NET server control
by Marco Bellinaso
Return the HTML code generated by the input ASP.NET server control
Note: the function only works with server side controls that don't generate postbacks and that can be declared outside a server-side form
Example: TextBox1.Text = GetControlHtml(DataGrid1)
|
|
GetListSelections - Retrieve a comma delimited list of items selected in a List control
by Marco Bellinaso
Return a comma delimited list of items selected in a List control (e.g. ListBox, CheckBoxList)
Example:
Dim selections As String = GetListSelections(CheckBoxList1)
|
|
HasUploadedFile - Return whether a file uploader control has posted a file to the server
by Marco Bellinaso
Return whether a file uploader control has posted a file to the server
|
|
Pre-filling a TextBox control with TextMode="Password"
by Marco Bellinaso
When the TextMode property of a TextBox control is set to Password, the value you assign to the Text property (either declaratively or programmatically) isn't actually displayed at runtime, not even in masked mode (with the * chars). This is of course done for security reasons, because even if ...
|
|
SetListSelections - Select in a List control the items passed as a comma delimited list
by Marco Bellinaso
Select the specified items (passed as a comma delimited list) in the input List control (e.g. ListBox, CheckBoxList)
Example:
SetListSelections(CheckBoxList1, "item 3, item 5, item 6")
|
|
ShowMessageBox - Showing a client-side message box at the next page load
by Marco Bellinaso
Show a client-side message box at the next page load
Example:
ShowMessageBox(Me, "Order successfully submitted!")
|
|
AddHandlerByName - Attaching to an object an event handler by name
by Francesco Balena
A generic routine that takes an object, an event name, and a list of potential
delegates to event handlers, and selects the first delegate that matches the
expected signature of the event handler.
Example:
AddHandlerByName(da, "RowUpdated", _
New OleDbRowUpdatedEventHandler(AddressOf ...
|
|
BlobToFile - Saving a BLOB field to a file
by Francesco Balena
Reusable routine that save a BLOB field to a file
Requires Imports for System.Data and System.Data.Common
Example: BlobToFile(dr, 2, "c:\xxxx.bmp")
|
|
CreateConnection - Creating a suitable connection object for a given connection string
by Francesco Balena
Create a suitable connection object for a given connection string.
Requires Imports for System.Data, System.Data.Common, System.Data.OleDb, System.Data.SqlClient and System.Data.Odbc
Example: Dim cn As IDbConnection = CreateConnection(connStr)
|
|
CreateDataAdapter - Creating a DataAdapter for a given connection object, via Reflection
by Francesco Balena
Create a suitable DataAdapter object for a given connection object.
Example:
Dim da As DbDataAdapter = CreateDataAdapter(cn, "SELECT * FROM Titles")
|
|
CreateDataAdapter - Creating a suitable DataAdapter object for a given connection object
by Francesco Balena
Create a suitable DataAdapter object for a given connection object.
Requires Imports for System.Data, System.Data.Common, System.Data.OleDb, System.Data.SqlClient, System.Data.Odbc and System.Data.OracleClient
Example:
Dim da As DbDataAdapter = CreateDataAdapter("SELECT * FROM Titles", cn)
|
|
FileToBlob - Loading a file into a SQL Server's BLOB
by Francesco Balena
Reusable routine that loads a file into a SQL Server's BLOB.
Requires Imports for System.Data and System.Data.SqlClient
(It supports only tables with one key field.)
Example:
FileToBlob(cn, "pub_info", "logo", "pub_id", "0877", "c:\Example.bmp")
|
|
Compare Oracle and SQL Server Dates
by Andy Clark
|
|
Override Built-in Keywords
by Darin Higgins
|
|
GetPostbackControl - Return a reference to the control that caused the last postback
by Marco Bellinaso
Return a reference to the control that caused the last postback, even from the Page_Load event!
It requires in input a reference to the posted-back page
(this is necessary if you want to be able to move this function in a separate class
instead of in a page's codebehind class
Example:
|
|
Format Color for HTML
by Monte Hansen
|
|
Clearing the Clipboard
by Marco Bellinaso
While VB6's Clipboard object has a Clear method, VB.NET class does not have such functionality. Here's a good workaround.
|
|
CheckSpelling - Using the Word's check-spelling engine
by Pebe
Do the check spelling on the input text
Returns the input text with the corrections applied from the Word's check-spelling dialog
Note: it requires a reference to the MS Word 9.0 library
Example:
MsgBox (CheckSpelling("This sentence iss far from being correcta"))
|
|
61-80 of 3200
Previous
Next |