Finally, an attempt to organize the content. These articles are taken from
many .NET emails I receive. I have eliminated the advertising garbage and
other miscellaneous and trivial articles.
Links
Our Best Web Links on Microsoft .NET: http://searchwebservices.techtarget.com/bestWebLinks/0,289521,sid26_tax288917,00.html
VB.NET
REASONS TO MOVE TO .NET
by Jimmy Nilsson
Most VB6 developers who have read about .NET, or who have played with
it, have a long list of reasons why you should upgrade to Visual
Basic .NET or C#. Common reasons include support for implementation
inheritance, an improved versioning schema and object constructors.
Some developers also see the support for free threading as a major
improvement over the VB6 Single-Threaded Apartment (STA)
multi-threading model. However, other developers warn about the
dangers that free threading will add. Using free threading certainly
can do some serious damage, but it also opens up new possibilities
for VB developers when building COM+ components. We can use the
object pooling service, for example, and the synchronization service
in COM+ makes it quite easy to write thread-safe components. (If you
leave out sharing objects between requests by using the
object-per-request mode, you're also relieved of most of the
threading issues.)for the full tip...http://www.searchWebServices.com/tip/1,289483,sid26_gci813226,00.html
Tales from the Crypto
Submitted by Donny Mack - 3/25/2002
http://www.dotnetjunkies.com/news/default.aspx?newsid=299
Billy Hollis outlines a complete program for encrypting and decrypting
files in Visual Basic .NET. (March 20, Article)
Call
VB6 from .NET
by Rockford Lhotka
Use .NET Interop services to call COM components from .NET, and .NET components
from VB6. It's a snap to do, and the performance hit is minimal with many data
types.
Call
VB6 From .NET
You can make these VB6 and .NET code bases interoperate using the .NET's
interoperability services, which let you write Visual Basic .NET applications
that use existing VB6 ActiveX DLLs or other COM DLLs, and also use DLLs created
with VB.NET in your VB6 apps.
VB.NET Watcher: Creating Objects
Dynamically
by Francesco Balena (fbalena@vb2themax.com)
Excerpt from Chapter 15 of "Programming Microsoft Visual Basic .NET"
(Microsoft Press - release date: first quarter of 2002)
The last reflection feature to be examined lets you dynamically create an object
on the fly if you have its class name. This is the Visual Basic .NET counterpart
of the CreateObject function. You can choose from two ways to create a .NET
object in this fashion: by using the CreateInstance method of the
System.Activator class or by invoking the one of the type's constructor methods.
If the type has a parameterless constructor, creating an instance is trivial:
Sub TestObjectCreation()
' Next statement assumes that the Person class is defined in
' an assembly named "ReflectionDemo".
Dim ty As Type = Type.GetType("ReflectionDemo.Person")
Dim o As Object = Activator.CreateInstance(ty)
' Prove that we created a Person.
Console.WriteLine("A {0} object has been created", o.GetType.Name)
End Sub
If you want to call a constructor that takes one or more parameters, you
must prepare an array of values:
Sub TestObjectCreation2()
Dim ty As Type = Type.GetType("ReflectionDemo.Person")
' Use the constructor that takes two arguments.
Dim params() As Object = {"Joe", "Doe"}
' Call the constructor that matches the parameter signature.
Dim o As Object = System.Activator.CreateInstance(ty, params)
End Sub
Creating an object through its constructor method is a bit more
convoluted, but I'm reporting this technique here for the sake of completeness:
Sub TestObjectCreation3()
Dim ty As Type = Type.GetType("ReflectionDemo.Person")
' Prepare the argument signature as an array of types (2 strings).
Dim types() As Type = {GetType(System.String), GetType(System.String)}
' Get a reference to the correct constructor.
Dim ci As ConstructorInfo = ty.GetConstructor(types)
' Prepare the parameters.
Dim params() As Object = {"Joe", "Doe"}
' Invoke the constructor and assign the result to a variable.
Dim o As Object = ci.Invoke(params)
End Sub
Unusual Shapes with GDI+ and VB.NET
GDI+ is the portion of the .NET framework that lets you output graphics and text on a form or to the printer. See how you can:
* Draw Cardinal splines
* Draw Bézier splines
* Draw dashed lines with custom caps
* Paint gradient backgrounds
* Create an array on the fly with VB.NET
ASP.NET
Bookmark this link, because here's where you'll find the top articles on what
ASP.NET features matter, as well as practical info on developing Web apps, using
page templates, and more. [Read
More]
Serve
Dynamic Pages Quickly
Bill Wagner shows you how to build Web apps that perform and scale better by
taking advantage of .NET's DataSet class. Use this class to create effective
n-tier applications.
Protecting All Files Using Forms Authentication
By Kevin T. Price - 3/28/2002
http://www.dotnetjunkies.com/howto/default.aspx?id=20
This article shows you how to use ASP.NET forms authentification and
protect non ASP.NET files.
Inheriting System.Web.HttpApplication
By Bipin Joshi - 3/26/2002
http://www.dotnetjunkies.com/howto/default.aspx?id=23
This How To illustrates how to create global functions by taking
advantage of the System.Web.HttpApplication class. Bipin will show
you two methods of doing this: First, using the standard global.asax.
Second, inheriting a custom class that is derived from
System.Web.HttpApplication in your own applications global.asax.
Displaying Multiple Fields in DropDownList.Text Property
By Doug Seven - 3/22/2002
http://www.dotnetjunkies.com/howto/default.aspx?id=19
This How-To demonstrates how to display multiple fields in the
DropDownList's Text property - such as FistName and LastName.
It’s not as easy to make message boxes expand their contents in Web apps as it
is in Windows. You can do it, though, with DataGrids. [Read
More]
Sure, you've used ASP.NET Tracing, but until you've tried these tips, you don't
really know what it can do. Jonathan Goodyear shows you how to get the
most from this debugging tool. [Read
More]
Programming Data-Driven Web Applications with ASP.NET
By Doug Seven and Donny Mack
Sams Publishing
http://www.dotnetjunkies.com/ads/adnav.aspx?AdID=7
Dynamic Events on an ASP.NET Page
By Peter van Ooijen - 4/3/2002
http://www.dotnetjunkies.com/tutorials.aspx?tutorialid=313
The .NET Framework has events everywhere and the handling of events in
NET offers some interesting possibilities. This article will show how
event handling methods are linked to webcontrols and how to
(de-)couple these event handlers at runtime.
Advanced DataGridding: Paging, Sorting, Showing Grid Statistics and
Hiding Redundant Controls
By Rumen Stankov - 4/1/2002
http://www.dotnetjunkies.com/tutorials.aspx?tutorialid=311
This article takes a look at how to solve some of the most common
problems developers encounter when trying to work with the DataGrid.
These include DataGrid paging, sorting by columns, showing statistics
about result, hiding the pager button and hiding the DataGrid itself
when there are no results to display. This article walks you through
a solution.
Developing A Newsletter Subscription Web Service
Submitted by Bipin Joshi - 3/29/2002
http://www.dotnetjunkies.com/news/default.aspx?newsid=310
Subscription based web services allow the users to subscribe or
unsubscribe to the service as per their requirement. This sample
application shows you how to develop a newsletter subscription
service in ASP.NET using C#.
ADO.NET
Using Typed DataSets
By Tin Lam - 3/25/2002
http://www.dotnetjunkies.com/tutorials.aspx?tutorialid=301
This article will first look at the DataSet class in ADO.NET. Then you
will look at its relationships with XML and XML Schema, and what they
are. Various approaches to generate the XML Schema files that will be
exposed, as well as how to use them to generate Typed DataSet in
different tools and finally how to use a Typed DataSet
Developing SQL Server Database Explorer
Submitted by Bipin Joshi - 3/23/2002
http://www.dotnetjunkies.com/news/default.aspx?newsid=298
This week I have added a new demo - SQL Server Database Explorer. It
illustrates how to use ADO.NET, Windows Forms ListView and TreeView
controls to develop a explorer that allows to navigate various
databases and tables of given SQL server.
A
Speed Freak's Guide to Retrieving Data in ADO.NET
by Craig Davis
Developers seek application horsepower to help the business, and in the process,
sites run faster and customers are happier. If you have a need for speed and
aren't sure of the best way to get data using ADO.NET then this article by Craig
Davis is for you. (from VB-2-the-Max)
Table Mapping in ADO.NET
Submitted by Donny Mack - 3/29/2002
http://www.dotnetjunkies.com/news/default.aspx?newsid=308
In this installment of Diving Into Data Access, Dino Esposito examines
the table mapping mechanism available in ADO.NET, and shows you how
to put it to work in your own applications. Table mapping is the
process that controls how data adapters copy tables and columns of
data from a physical data source to ADO.NET in-memory objects. A data
adapter object utilizes the Fill method to populate a DataSet or a
DataTable object with data retrieved by a SELECT command. Internally,
the Fill method makes use of a data reader to get to the data and
the metadata that describe the structure and content of the source
tables. The data read is then copied into ad hoc memory containers
(that is, the DataTable). The table mapping mechanism is the set of
rules and parameters that lets you control how the SQL result sets
are mapped onto in-memory objects.
.NET Web Services
AVOIDING SOAP SCUM | Featured Topic
Integration is a
top business priority but robust integration technology
requires big bucks. Enter an alternative: Web services. Hurwitz
cautions that Web services and business process management should be coupled
together to avoid future integration problems. for current
Featured Topic...http://searchwebservices.techtarget.com/featuredTopic/0,290042,sid26_gci811163,00.htm
People can't use your Web Service if they can't find it. Thom Robbins explains
how you can use UDDI to keep your Web Services from getting lost in the pile. [Read
More]
Use Web services to display reports directly in Excel. Doing so enables you to
retain the usefulness of rich-client applications, while enabling their delivery
over the Internet. [Read
More]
UNDERSTAND SOAP EXTENSIONS | Tip: Bob Tabor
In the previous tip, Bob discussed DiffGrams and he showed what a
DiffGram looked like in its native habitat. Since these creatures
only come out under the cover of a SOAP message (and are therefore
too fast for humans to see with the naked eye) we need a tool to
capture a snapshot picture of what a SOAP message looks like during
transfer between client and server. To do this, we're going to take a
brief detour and talk about how ASP.NET works so we can then explain
how SOAP Extensions will allow us to plug into and capture the SOAP
stream before (or after) it gets transformed into an object that is
processed by your Web Service code, and also capture the objects
before (or after) they are transformed back into an outgoing SOAP
message.
>> CLICK to read the Full Tip...
http://searchvb.techtarget.com/tip/1,289483,sid8_gci811028,00.html
Retrieving Data from Web Services using Standard HTTP 1.1
Compression
By Jacek Chmiel - 3/27/2002
http://www.dotnetjunkies.com/tutorials.aspx?tutorialid=304
This very interesting article demonstrates how to reduce network
bandwidth while using Web Services by using standard HTTP 1.1
compression techniques.
Web Services can be slow...but they don't have to be. Check out this sample app
and tip to see how caching can speed up your Web Services. [Read
More]
Most people don't know it, but you can format .asmx pages. Add clarity and
visual punch with HTML in your Web Service descriptions. [Read
More]
XML
Sure, XML's the lingua franca of .NET, but first you've got to get your
data into XML. Get to know these three techniques for transforming
relational data into XML. [Read
More]
XML INTEGRATION - A BETTER WAY?
At Denise Draper's recent Webcast "Next Generation Data
Integration,"
a user asked, "XML is not native to most apps, so doesn't make sense
to integrate those apps using XML. Better way: use an XML-native
EAI-type solution with native application adapters...compare this
against straight XML integration please."
to read Denise's response...
http://searchwebservices.discussions.techtarget.com/WebX?msgInContext@106.ba7oaizzhqf^4@.1dcf7f11/136
Learn
XML and SOAP the Microsoft Way
XML is a standard today, yet there are a few minor differences in how it has
been implemented and supported by different browsers. The book "XML - The
Microsoft Way" by Peter G. Aitken also covers the SOAP XML grammar, which
has become so central to the Microsoft .NET initiative. This book includes a
survey of the XML technology, but then focuses on the Microsoft MSXML parser,
its strengths and the ways it differs from other implementations. The Simplified
Object Access Protocol is a technique that uses XML to transport information
over the Internet and is the foundation of Web service technology. Read a
chapter on SOAP, the Simplified Object Access Protocol, in our Book Bank
section.
Use the .NET Framework's XML serialization features to create a Web service that
returns and consumes objects. You'll learn how to support both native and .NET
clients. [Read
More]
Visual Basic 6
VISUAL BASIC 6 SUPPORT WILL END | News: ZDNet
The party has to end sometime. For VB 6.0 users, the party ends in
2008. That's when Microsoft will put it out to pasture. The company
will reduce support in 2005, and customers will have to start
shelling out money. Microsoft also says VB 6.0 will never get much
support in 64-bit environments.
For the full story,
click:
http://zdnet.com.com/2100-1104-863702.html
ADD A BUTTON IN THE TITLE BAR
Member Haeresis submits this week's featured code: "This code adds a
button in the Title Bar. This code works with Windows 9* and Windows
NT/2000!" for the Code... http://www.vbcode.com/Asp/showsn.asp?theID=6570
ADD A BUTTON IN THE TITLE BAR | SearchVB Code
Member Haeresis submits this week's featured code: "This code adds a
button in the Title Bar. This code works with Windows 9* and Windows
NT/2000!"
CLICK for the Code...
http://www.vbcode.com/Asp/showsn.asp?theID=6570
WRITING MATHEMATICAL FORMULAS
SearchVB member luis_roig posts: "I need to write mathematical
formulas -- the only way that I find to do that is 'drawing' it in
paint (or something else) and putting it on a picture or image box.
Are there any other, more intelligent ways to do that?" Can you help
this SearchVB member? for the Full Discussion... http://forums.vb-web-directory.com/ubb/Forum1/HTML/002275.html
CopyRecordset
Routine Updated for ADO 2.6
Graham Charles of Ars
Indicii Information Design found that our tip "Quickly create a copy of
an ADO Recordset" doesn't work exactly as it reads with ADO 2.6, possibly
because of an undocumented change in ADO. Here is the original tip as it appears
in our Tip
Bank.
An interesting ramification of this ADO 2.6 change is that a manual recordset
copy is much more efficient when only a few records are desired from the source
recordset (that is, when a fairly restrictive filter condition has been set).
For example, copying a 90-field, 1200-record recordset on my system took an
average of 1.99 seconds using your PropertyBag copy and 4.73 seconds using a
manual recordset copy. However, when a filter was applied to result in 50
records, your method took the same time (2.01 seconds); a manual copy of the
filtered records only took an average of just 0.23 seconds.
The complete CopyRecordset version set by Graham Charles follows:
' ***********************************************
' *** Public Method adoCopyRecordset
' *** function: Creates a fabricated copy of a recordset.
' *** accepts: (recordset) object to copy
' *** (boolean) if T, copies the data as _
well as the schema
' *** returns: (recordset) recordset copy
' *** date: 01/07/02
' *** author: gpc
' ************************************************
Public Function adoCopyRecordset(rsSource As ADODB.Recordset, _
Optional CopyData As Boolean = False) As ADODB.Recordset
' /// DEFINITIONS
Dim aFields ' / field name array
Dim aValues ' / field values array
Dim rsNew As ADODB.Recordset ' / return recordset
Dim iField As Long ' / iterator into fields
Dim PB As PropertyBag ' / property bag to hold RS copy
Dim bManualCopy As Boolean ' / flag: copy using the manual method?
On Error Resume Next
' /// INIT VAL
With rsSource
If (.CursorLocation = adUseClient) Then
If (CopyData) Then
If .RecordCount < 500 Then _
' / arbitrary, based on developer's system
bManualCopy = True
End If
End If
End If
' /// START
If Not bManualCopy Then
'/// property bag method
Set PB = New PropertyBag
PB.WriteProperty "filtered", rsSource
Set rsNew = PB.ReadProperty("filtered")
Set PB = Nothing
rsNew.Filter = .Filter
Else
' /// manual rs creation
' // create the new recordset
Set rsNew = New ADODB.Recordset
' / create a fields array and a data value array
ReDim aFields(.Fields.Count - 1)
ReDim aValues(.Fields.Count - 1)
' / copy fields
For iField = 0 To .Fields.Count - 1
With .Fields(iField)
rsNew.Fields.Append .Name, .Type, .DefinedSize, _
.Attributes
aFields(iField) = .Name
End With
Next
' / copy data
If CopyData Then
rsNew.Open
If Not (.EOF And .BOF) Then
.MoveFirst
Do Until .EOF
For iField = 0 To .Fields.Count - 1
aValues(iField) = .Fields(iField).Value
Next
rsNew.AddNew aFields, aValues
.MoveNext
Loop
End If
End If
End If
End With
ExitHere:
On Error Resume Next
Set adoCopyRecordset = rsNew
Set rsNew = Nothing
Exit Function
ErrHandler:
Resume ExitHere
End Function
HIDDEN DROP-DOWN TOOLBAR | SearchVB Code
Member Bryan King submits this week's featured code. This code
creates a toolbar that hides just above the desktop. When the cursor
is positioned near the top of the screen it makes the toolbar drop
down. Moving the cursor off the form makes the form hide itself
again.
>> CLICK for the Code Download...
http://www.vbcode.com/Asp/showsn.asp?theID=6452
Database
DOES XML FIT INTO RELATIONAL DATABASES? | Enterprise Developer Forum
At Denise Draper's recent Webcast "Next Generation Data
Integration,"
a user asked, "How does XML fit into relational databases, e.g.
Access for instance?"
to read Denise's and others' responses...
http://searchwebservices.discussions.techtarget.com/WebX?msgInContext@90.wdf4abiAhKK^1@.1dcf7f11/138
In a world full of prying eyes, it's vital you keep your data secure. Learn how
to keep information safe with cryptography in VS.NET. [Read
More]
RE-INDEXING TO IMPROVE QUERY PERFORMANCE
Often when large updates are carried out against tables you may
experience poor query performance in terms of response time. This
requires rebuilding the indexes, which can be done in either of the
following two ways described in this tip. to read the Full Tip... http://searchvb.techtarget.com/tip/1,289483,sid8_gci813609,00.html
SQL SERVER TOOL
Member Rohr Software submits this week's featured code: "This SQL
Server tool allows you to perform basic database function
programmatically. You can create databases, tables, and columns. You
can even drop columns, and tables."
>> CLICK for the Code Download...
http://www.vbcode.com/Asp/showzip.asp?ZipFile=http://www.vbcode.com/code/SQL_Server03192002.zip&theID=648
.NET Framework
REASONS TO MOVE TO .NET Tip by Jimmy Nilsson
Many developers are thinking about moving to .NET, yet may not
understand good reasons to do so. Never fear: In this tip, excerpted
from InformIT, Jimmy Nilsson discusses one such reason -- multi
threading. to read the Full Tip...http://searchvb.techtarget.com/tip/1,289483,sid8_gci813598,00.html
Watch hundreds of tutorial screen cams for .NET developers...http://www.learnvisualstudio.net?svb032702NL
Microsoft .NET Framework Service Pack
Microsoft .NET Framework Service Pack 1 provides the latest updates to the .NET
Framework. Service Pack 1 is highly recommended for all users of the .NET
Framework, including customers of Visual Studio .NET.
http://msdn.microsoft.com/netframework/downloads/sp1/default.asp
MICROSOFT ISSUES FIXES FOR .NET FRAMEWORK | News: Wininformant
The .NET Framework platform software is barely out of the gate, but
the corresponding service pack is already ready already. The pack is
packing security fixes for a flaw that lets downloaded .NET code run
with elevated permissions. Issues with COM interoperability, type
libraries, and the .NET Common Language Runtime are also addressed.
You may download .NET Framework SP1 through the Windows update
function or via the Microsoft Web site.
Top
10 .NET Framework Classes
Windows developers everywhere have reason to celebrate the arrival of .NET, but
Visual Basic developers should be the most ecstatic. VB developers get true
inheritance, structured exception handling, and a state-of-the-art IDE and the
Framework Class Library (FCL). To celebrate the release of .NET, CoDe Magazine's
Mike Snell and Lars Powers present their picks for the top ten most useful,
utterly awesome (and coolest) classes bundled inside the .NET FCL. (from CoDe
Magazine)
Before .NET, you were forced to handcraft
event-handling solutions. Check out these design tips and development tricks
that take advantage of .NET's rich events support infrastructure. [Read
More]
Microsoft Visual J#.NET Beta 2
Microsoft Visual J#.NET is a development tool for Java-language developers who
want to build applications and services on the Microsoft .NET Framework. Visual
J#.NET joins more than 20 previously-announced languages with its ability to
target the .NET Framework and first-class XML Web services.
http://msdn.microsoft.com/visualj/jsharp/beta.asp
MICROSOFT RELEASES NEW JAVA-RELATED TOOL | News: CNET
Sun won't be celebrating this news, but Microsoft has unleashed
another Java jumping tool. The second beta of Visual J# .NET is out
-- it's a tool that lets programmers use Java to build software that
works on .NET and only .NET. A final version is due in the middle of
the year. The tool is one of the stars of the billion-dollar lawsuit
Sun has filed against Microsoft. Sun says the tool taints Java.
Threading in .NET Part 1
By Ben Hinton - 3/22/2002
http://www.dotnetjunkies.com/tutorials.aspx?tutorialid=296
Part one on this series on threading introduces you to the basics. It
provides you with sample code and explanation of what threading is,
how to use it, when to use it, and what .NET objects you use to
implement it.
Threading Part 2
By Ben Hinton - 3/29/2002
http://www.dotnetjunkies.com/tutorials.aspx?tutorialid=307
In Threading Part 2, Ben goes further into Threads illustrating how to
suspend, terminate, abort, and check the status of threads. He also
goes into what the difference between background and foreground
threads are.
Build Database Apps with SQL Server 2000 and Visual Studio .NET
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/Dnsql2k/html/sql_builddbappsinvsnet.asp?frame=true