Thursday, December 02, 2004
Wednesday, December 01, 2004
Visual Studio Debug Stored Procedures in VS.NET
Tuesday, November 30, 2004
ADO.Net 2.0 and enhancements
The article compares ADO.Net 2.0 with 1.1 and lists down the enhancements for DataSet, DataTable and DataView classes.
Here are some of the new features in ADO.NET 2.0
- There has been a lot of performance
improvement working with DataSet in 2.0.
- Now one can serialize a DataSet into
binary data using ds.RemotingFormat
= SerializationFormat.Binary
- DataTable now supports ReadXML,
ReadXMLSchema, WriteXML and WriteXMLSchema methods.
- DataTable also includes 2 new methods
GetDataReader and Load. GetDataReader returns a DataTableReader which can
be used to iterate throw the rows just like SQLDataReader.
- Load method loads the table with
specified IDataReader parameter. The second parameter is LoadOption enum (OverwriteRow,
PreserveCurrentValues and UpdateCurrentValues). The article explains the
differece between these in an easy to understand way.
- DataView has a new method ToTable()
which returns DataTable object created out of the DataView.
Thursday, November 25, 2004
Why Are So Many Of The Framework Classes Sealed?
more here..
http://weblogs.asp.net/ericlippert/archive/2004/01/22/61803.aspx
Tuesday, November 23, 2004
Printer name in C#
Use printer admin object (prnadmin.dll)
Here is the snippet...
Dim tObjPrinter As Object
Private mObjPrintMaster As Object
Try
mObjPrintMaster = CreateObject('PrintMaster.PrintMaster.1')
tObjPrinter = CreateObject('Printer.Printer.1')
mObjPrintMaster.PrinterGet('',PrinterName , tObjPrinter)
mObjPrintMaster.DefaultPrinter = mStrPrinterName
mObjPrintMaster.PrinterSet(tObjPrinter)
Catch ex As Exception
End Try"
There are many a times when we might have to change our system name after installing SQL server and SQL might throw an error during some operations,
You need to change the srvname fields in the sysservers table in the master DB, but this cannot be done directly form the table view, as ad-hoc updates to this table is not allowed, below is an sp using which we can achieve the task.
****For Default Instance****
sp_dropserver
go
sp_addserver , local
go
****Foa a named instance****
sp_dropserver
go
sp_addserver , local
go
For more info and FAQs check this link.
http://support.microsoft.com/kb/257716/en-us"
Kannan's DOTNET Lounge
*****This Script Corrects broken dll links, handy script if ur DOTNet installation does something funny......*****
*****write copy the entire script and save as a batch file.
***if u r typing from the command prompt, ignore the lines that start with 'Echo', type only the commands below the Echo line.
Echo Stop IIS
iisreset /stop
echo '----------------------'
echo 'Deleting the ASPNET account.'
net user ASPNET /delete
echo '----------------------'
echo 'Reregistering ASP.NET and the ASPNET account.'
aspnet_regiis -i
echo 'Restarting IIS.'
iisreset /start
echo '----------------------'"
Sunday, November 21, 2004
MSDN Beta documentation url
http://msdn2.microsoft.com/library/default.aspx
Though this documentation is not complete, you can use this for reference.
Thursday, October 07, 2004
MSDN India Home Page
http://www.entmag.com/news/article.asp?EditorialsID=6351
Wednesday, September 08, 2004
Free RichTextBoxEditor in ASP.NET
You can download the source code here..
http://www.freetextbox.com/
Tuesday, September 07, 2004
ASP.NET can now post to a different page
ASP.NET can now postback across pages .You can use the PostTargetUrl attribute to specify
which ASPX the postback should go to.Once the postback happens to the target page, assuming
the page is different one than the one which made the postback The target page can access the
controls of the sender by using the PreviousPage object reference and extract the values from there.
Also, With Whidbey, you have a NGEN-kind-of application that will pre-compile your ASP.NET WebApps prior to deployment. This will speed up the initial invocation. The system has built-in health monitoring support that shall notify the parent incase of any issues in the
execution of any WebApp.
ASP.NET : you got to write resuable code (say a library), compile to an assembly
and then deploy it to the bin folder, and make changes to your pages
to reference it
Whidbey: With Whidbey, all this is gone. Simply write the code and put this code in a special folder called "Code"ASP.NET Whidbey shall compile this source at runtime, produce the assembly and make this assembly available for all the pages in the Web App
The ASP.NET V2.0 Page lifecycle
http://hydrate.typepad.com/leo/images/asp.NET%20Page%20LifeCycle.html
Sunday, September 05, 2004
Runtime code generation and execution in C# using Reflection
http://www.microsoft.com/india/msdn/articles/242.aspx
ASP.NET 2.0 links
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
http://www.asp.net/whidbey/Default.aspx?tabindex=0&tabid=1
Interview with Scott Guthrie
http://msdn.microsoft.com/asp.net/whidbey/scottgu.aspx
Books
Introducing Microsoft® ASP.NET 2.0 - Dino Esposito (Wintellect)http://www.microsoft.com/MSPress/books/6962.asp
A First Look at ASP.NET v 2.0 - http://www.daveandal.net/books/8960/
Articles on ASP.NET 2.0 http://www.codeguru.com/Csharp/.NET/net_asp/miscellaneous/article.php/c5365/
Validation Controls ASP.NET 2.0
Introduced Validation groups.Developers faced one important limitation when using the validation controls. Since an ASP.NET page can include only one server-side form, there was no way to present multiple forms that included validation on the same page. Submitting any form in a page would trigger validation of all of the forms in the page.
This problem is solved in the ASP.NET 2.0 framework with the introduction of validation groups. In the ASP.NET 2.0 framework, the form controls, the button controls, and the validation controls have been modified to support a new property named ValidationGroup. Form controls in separate validation groups are validated independently.
more details..
http://msdn.microsoft.com/asp.net/whidbey/default.aspx?pull=/library/en-us/dnvs05/html/valgroups.asp
ViewState in ASP.NET 2.0
Viewstate in ASP.NET 2.0
The release of ASP.NET 2.0 brings several improvements to the view state mechanism that will make it easier to use without hindering your site's performance.
These improvements include a
- ASP.NET 2.0 changes serialization format
- reduction in encoding size
- the introduction of control state to separate behavioral state from content
- intelligent integration with data-bound controls
- Introduction of Control state
For example, if we place a DataGrid on a form and bind it to the authors table in the pubs database, the size of the view state string in 1.x is 12,648 characters. If we do the same in 2.0, the size of view state is reduced to 6,728 characters, a reduction of nearly half.
Control state:Control state is another type of hidden state reserved exclusively for controls to maintain their core behavioral functionality, whereas view state only contains state to maintain the control's contents (UI). Technically, control state is stored in the same hidden field as view state (being just another leaf node at the end of the view state hierarchy), but if you disable view state on a particular control, or on an entire page, the control state is still propagated.
more details..
Thursday, September 02, 2004
Saturday, August 28, 2004
.NET CLR Profiling
This article describes the .NET CLR Profiling Services and shows how to use the services to build a simple profiler that will provide hot spot information for any .NET application. The sample profiler can easily be modified to suit other profiling and monitoring needs.
http://msdn.microsoft.com/msdnmag/issues/01/11/NetProf/default.aspx