151 posts from: Shahed Khan
C# Programming Guides in MSDN
(Indexed 2008-01-27):
Inside a C# Program Main() and Command Line Arguments (C# Programming Guide) Types (C# Programming Guide) Arrays (C# Programming Guide) Strings (C# Programming Guide) Statements, Expressions, and Operators (C# Programming Guide) (Anonymous Functions, Lambda Expression, Anonymous Methods) Objects, Classes, and Structs (C# Programming Guide) Properties (C# Programming Guide) Indexers (C# Programming Guide) Delegates (C# Programming Guide) Events (C# Programming Guide) Generics (C# Progr...(truncated)...
Visual Studio Debug Tips: Memory Window
(Indexed 2008-01-11):
Visual Studio Debug Tips: Memory Window http://msdn2.microsoft.com/en-us/library/s3aw423e(VS.80).asp...(truncated)... be useful the next time I guess! [Image][Image]
ASP.NET Web Service Tips: Documentation
(Indexed 2008-01-10):
wsdlHelpGenerator makes it very easy to write our Own Help page for the ASP.NET Web service application. Sometimes you might not like the autogenerated Help page and want to add your own company logo and put your own descriptive help page. The following piece of tweak of your web.config will do the trick. If you want to use Attributes to give some description to your WebService and WebMethods,You can do this: [WebService(Description = "Your Web service desctiption!!")] ...(truncated)...
Different ways of Validating ASP.NET Forms
(Indexed 2007-12-16):
Validating user input is a very common task that we perform during web page development, and in the ASP.NET world we have a handful amount of choices to perform validation. ASP.NET Validation Controls ASP.NET ships with a handful amount ASP.NET Validation controls such as RequiredFieldValidator, CompareValidator, RangeValidator, RegularExpressionValidator, CustomValidator and ValidationSummary. These controls are very easy to hook up with other ASP.NET controls, and if properly configured they c...(truncated)...
X509Certificate cannot be located from CurrentUser Store in IIS
(Indexed 2007-11-23):
Background and Problem Recently, I developed a website which implements PKI infastructure. On Click of a Button I sign and encrypt a document and send to desired location. During the development I have put the signer certificate in my "Certificates-CurrentUser" store and worked good. But when I deployed the sitein production I found that IIS cannot locate the certificate from "Certificates-CurrentUser" store.Initially Iwrote this code and whichwas the CULPRIT:object locationCertificate = "SomeCe...(truncated)...
Sql 2005 Database diagram support objects cannot be installed because this database does not have a valid owner
(Indexed 2007-11-19):
ProblemAfter restoring DB in SQL Server 2005 db most of the time I get the following error:Database diagram support objects cannot be installed because this database does not have a valid owner. To continue, first use the Files page of the Database Properties dialog box or the ALTER AUTHORIZATION statement to set the database owner to a valid login, then add the database diagram support objects.SolutionThis was not new to me and I always used to take the following steps to solve it:1. Right Clic...(truncated)...
Smart404: Handle 404 smartly in ASP.NET
(Indexed 2007-10-24):
IntroductionThe 404or Not Found error message is an HTTP standard response code, there are many reasons for a 404 to show up like, Mistyped URL Pages have been moved. Pages have been deleted. The default error page for 404 may look something similar to this: [Image] The purpose of this blog/article is to discuss ways to handle 404 smartly in ASP.NET. So the big question is how? On an event of 404, the first thing I would try do is to catch the event and redirect to somewhere where I can handl...(truncated)...
Duplicate items are not supported by the "Sources" parameter (VS2005 IDE error)
(Indexed 2007-10-23):
Problem: In one of my new project after generating some codes with .NetTiers, when I tried to compile the project in VS2005 IDE it started showing this error:The item "Audit.cs" was specified more than once in the "Sources" parameter. Duplicate items are not supported by the "Sources" parameter. MyProject.Net.Entities As you can guess there is not enough information or any direction on how to resolve this issue. Solution: As usual started googling and found some hints that in the csproj file the...(truncated)...
Databinding using ObservableCollection<T>
(Indexed 2007-10-11):
Someone asked me today:I have a text field and a drop down menu, based on the values of these 2 when i click on a button an api call is made to get the results. Now i want to display these results in a ListView using GridView. How can i use ObservableCollection to read the data when the search button is hit.My Short Reply: Creating an ObservableCollection is pretty straight forward.1. For example say we have class Customer { id, name, address }2. Now lets create a DataSrc that returns an Observa...(truncated)...
WPF Databinding Resources and Links
(Indexed 2007-10-09):
WPF Databinding Resources:source: http://www.actiprosoftware.com/Support/ResourceGuides/WPF/Vi...(truncated)... Lockable Collections (alexshed.spaces.live.com) - 31 views, unrated Shows how to create a collection locking mechanism to allow some clients to change the collection while disallowing others. Posted 10/01/2007 by Actipro Software Support Binding to the Current Item in WPF (www.interact-sw.co.uk) - 117 views, unrated Shows some use of concise data binding syntax for working with i...(truncated)...
Releasing the Source Code for the .NET Framework Libraries
(Indexed 2007-10-04):
Check this out at Scotts Blog: source: http://weblogs.asp.net/scottgu/archive/2007/10/03/releasing-...(truncated)... Releasing the Source Code for the .NET Framework Libraries One of the things my team has beenworking to enable has been the ability for .NET developers to download and browse the source code of the .NET Framework libraries, and to easily enable debugging support in them. Today I'm excited to announce that we'll be providing this with the .NET 3.5 and VS 2008 release later this y...(truncated)...
Programatically Loading Providers by Avoiding web / app config
(Indexed 2007-09-26):
BackgroundRecently I was in a situation where I had to exposetwo of my .NETLibraries as COM, to invokevia VBScript (Late Binding) from one of the Legacy Application. One of the .NET Library uses .NetTiers and the other one uses Subsonic as the DAL, so as you can understand all the configurations are declared in the app.config / web.config file as something like this:Nettiers Config Subsonic Config Investigation I started playing with it. Step1: I wrote my special layer (library) o...(truncated)...
Visual C# Development Settings
(Indexed 2007-09-24):
source: http://blogs.msdn.com/karenliu/archive/2006/06/12/628756.aspxVisual C# Development Settings Default KeyBindings Editing Edit.CollapseToDefinitions CTRL + M, O Collapses existing regions to provide a high-level view of the types and members in the source file. Edit.CommentSelection CTRL + K, C or CTRL + E, C Inserts // at the beginning of the current line or every line of the current selection. Edit.FormatDocument CTRL + K, D or CTRL + E, D Formats the current document according...(truncated)...
Tips and Tricks VS2005 and CS2008
(Indexed 2007-09-24):
source: http://blogs.msdn.com/karenliu/archive/2007/06/21/tips-and-t...(truncated)... and Tricks for VS20005 and VS2008 Tips for Understanding Code 1) [VS 2008] Target Multiple Versions of the Framework Use .NET 3.0 to target Vista Use .NET 3.5 to get started with LINQ Project | Properties | Application Tab 2) C# Development Settings Share your settings Tools | Import and Export Settings 3) Add New Item [VS 2008] Categorical Filter-as-you-type 4) Class Designer Visual, high-level vi...(truncated)...
Loading Xps from MemoryStream
(Indexed 2007-09-23):
A common way of loading XpsDocument is to load it from file:XpsDocument document = new XpsDocument(filename, FileAccess.Read, CompressionOption.NotCompressed);FixedDocumentSequence fixedDocumentSequence = document.GetFixedDocumentSequence();//To view in the DocViewerdocViewer.Document = fixedDocumentSequence as IDocumentPaginatorSource; But if we need to Load the Xps from a Stream we can use the Package Class and do the following:private void LoadXpsFromStream(Byte[] xpsByte, string packageUriSt...(truncated)...
Redirect to Login page on session expiration (ASP.NET)
(Indexed 2007-09-06):
ProblemRedirect the user to login page after a period of inactivity or when the session expires.InvestigationA quick search on Google will find many articles which discuss how we can detect session expiration and how to redirect to the login page.However, most of the methods described require page refreshesor requests to the serverto find out whether the session expired. Some ways of detecting whether asession hasexpired:1. ASP.NET Forum ArticleIf you are using cookie, you can store a marker in ...(truncated)...
Loading Providers in Medium Trust Mode using WebConfigurationManager
(Indexed 2007-07-16):
Problem:Recently I uploaded a ASP.NET2.0 website with a hosting provider (shared environment), and started getting this error when everI wanted to load the providersdeclared on the config file:[SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.] System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0 System.S...(truncated)...
Be careful using Member Name with suffix "Specified", it has special meaning to the XmlSerializer
(Indexed 2007-07-12):
Members with names ending on 'Specified' suffix have special meaning to the XmlSerializer: they control serialization of optional ValueType members and have to be of type System.Boolean.Here is a test class to generate the exception where I explicitly declared the 'generating_bugSpecified' Member to integer.[System.Xml.Serialization.XmlIncludeAttribute(typeof...(truncated)... public class TestBug{ [System.Xml.Serialization.XmlAttributeAttribute()]public System.Int32 generating_bug; /// [System...(truncated)...
Working with *Specified Properties.
(Indexed 2007-07-12):
Problem:The value ofDateTimepropertyis assigned but its not included in the serialized xml.SomeClass msg = new SomeClass();msg.generated_on = DateTime.Now ; if we serialize this we will find this: as opposed to Here is the c# code of SomeClasspublic class SomeClass{ /// [System.Xml.Serialization.XmlAttributeAttribute()]public System.String generated_on; /// [System.Xml.Serialization.XmlIgnoreAttribute()]public bool generated_onSpecified; } Clarification: ========== if we create anobj...(truncated)...
Imagine Cup 2007 Australia - Winner Uni of Canberra
(Indexed 2007-06-28):
It was a unique experience for me to be part of the Imagine Cup, I also congratulate University of Canberra. More details ....source: http://www.apcmag.com/6514/now_the_blind_can_program_in_netAPC Magazine ReportIt's not every day that a student programming competition delivers a solution with the power to change some people's lives. The winners of Microsoft Australias Imagine Cup have come up with a system that makes it possible for blind people to program in C#. The team, from the University ...(truncated)...
SmartCodeGenerator UIProperty for ArrayList of Strings
(Indexed 2007-05-25):
Note: If you are not familiar with writing UIProperty for SmartCodeGenerator please read this tutorial blog first: http://community.smartcodegenerator.com/blogs/team_blog/arch...(truncated)... recently got a request to be able tohandle ArrayList defined in TheProperties.cs. Sothe SCG Developerwanted to define string in a ArrayList and wanted to displaythem during runtime in a combobox, like the one we do with the Enumerator, and wanted to use the selected value in the templates.Soon I realizedth...(truncated)...
Silverlight Resources and Links
(Indexed 2007-05-15):
Silverlight Resources bits & bytes Get silverlight Telerik RadControls 3d virtual rooms using control based framework DLR & IronPython Silverlight developer reference poster Forums installation, troubleshooting Electric rain harmony (coming summer 2007) flash to silverlight converter Silverlight 1.0 Beta QuickStarts Silverlight 1.1 Alpha QuickStarts sites Main Microsoft site. Community site. Mix conference experiences & demos Getting started with silverlight - Scott Guthrie de...(truncated)...
ASP.NET MembershipApi Cannot resolve collation conflict for equal to operation
(Indexed 2007-05-08):
In one of our site where we used a ASP.NET Membership API, while deploying to production we started getting "Cannot resolve collation conflict for equal to operation" on the event of Adding Roles to User and Deleting Roles from User. I ll show howI solved it later but lets look at it from step 1 ....asp.net was throwing out the following error. Server Error in '/' Application. Cannot resolve collation conflict for equal to operation.Description: An unhandled exception occurred during the exec...(truncated)...
ASP.NET, Javascript tips: Encrypt /Sign /Verify signed message using Capicom ActiveX
(Indexed 2007-05-04):
This demonstrates possibilities on encrypting, signing, verifying message using the Capicom ActiveX and javascript in a webbrowser. An ASP.NET developers can take note of this technique when you want to invoke to capicom dll to implement PKI infastructureusing a browser. I know .NET SmartClient would have been another option where you can use the .NET FrameworkLibrariesto deal withX509Certificates, but you might want to know this technique too:Source Blog: http://www.feed-squirrel.com/index.cfm?...(truncated)...
Check out this Article for Xml based codegeneration with SCG
(Indexed 2007-04-26):
I uploaded this new article in the Unedited Section of CodeProject. AbstractThis article describes how we can use XML as a metadata source for SCG Templates. It also shows step-by-step instructions of how to generate strongly typed objects from XSD and use it in the templates to generate text based output. ASP.NET developers can also use this paper as reference to transform XML using ASP.NET scripts and avoid XSLT. Introduction We all agree that XML's primary purpose is to facilitate the sharing...(truncated)...
Example SmartCodeGenerator: BusinessObjectGenerator
(Indexed 2007-04-25):
While browsing the internet I found this article Business Object for CodeSmith by JR Hull, this comes with some CodeSmith templates that generates object layer, data access layer, and related sql from a schema defined in the XML. I thought this will be a good and quick example to show for SCG where XML is concerned, I converted the templates to SCG templates and these are producing the same output. These templates will generate ObjectLayer, DataAccess Layer and SQL for you.To run the example qu...(truncated)...
MS Tool to Migrate from Oracle to SQL Server
(Indexed 2007-04-19):
Microsoft has released a new tool to migrate from Oracle to MS SQL."SQL Server Migration Assistant for Oracle V3.0 "http://go.microsoft.com/?linkid=6604763This download is a complete suite of tools that cuts the effort, cost, and risk of migrating from Oracle to SQL Server.Enjoy converting hasslefree.....[Image][Image]
An alternative approach to XSLT with ASP.NET scripts
(Indexed 2007-04-13):
XSL stands for Extensible Stylesheet Language (OR XSL = Xml Style Sheet) and XSLT is the language to transform XML documents. Its a common practice to use XSLT to to transform an XML document into another XML document, or another type of document that is recognized by a browser, like HTML and XHTML. Normally XSLT does this by transforming each XML element into an (X)HTML element.But today we will see how we can use ASP.NET scripts to achieve the same. This blog post is dedicated to those program...(truncated)...
Ajax.Asp.Net Tips and Tricks: Adding Dynamic Controls to UpdatePanel and Identifying what control has triggered the event.
(Indexed 2007-04-05):
Here is a cool technique on how to identify which control has triggered the UpdatePanel (when dynamic controls are added during runtime). Here we will use the Request Object to identify this. Lets say we have updatePanel1 and during runtime we go and add dynamic buttons.... button1, button2 in the Panel1.... LinkButton button1 = new LinkButton();button1.ID = "button1"button1.Text = "button1" LinkButton button2 = new LinkButton();button2.ID = "button2"button2.Text = "button2" ...(truncated)...
Asp.Net Ajax Resources, Links and Documentation
(Indexed 2007-04-05):
Getting Started Overview Installing ASP.NET AJAX Sample ASP.NET AJAX Application Introduction to the UpdatePanel Control Introduction to the UpdateProgress Control Introduction to the Timer Control ASP.NET AJAX Server Controls UpdatePanel Control Overview The UpdatePanel Control UpdateProgress Control Overview The UpdateProgress Control Timer Control Overview The Timer Control ScriptManager Control Overview Client Scripting Extending JavaScript with ASP.NET AJAX Creating Cu...(truncated)...
SmartCodeGenerator with NAnt and Cassini - Please vote.
(Indexed 2007-03-22):
I have uploaded SmartCodeGenerator 2.7.0 today. This release ships with scg_console.exe which integrates NAnt and Cassini with SmartCodeGenerator development cycle. I have also uploaded a new article at CodeProject demonstrating "How to use SCG along with NAnt and Cassini." Smart Code Generator: Code Generation experience with ASP.NET, NAnt and CassiniThis article describes how NAnt and Cassini can be integrated with the Smart Code Generator development cycle. This article can also used as a ref...(truncated)...
WebMethod parameter as ref
(Indexed 2007-03-15):
I came across WebMethods where parameter is passed as ref. But is this a good practice? //Option1 with ref[WebMethod]public void Transaction2(ref Test test ){}As opposed to writing//Option2[WebMethod]public Test Transaction1(Test test ){}But we should be aware that when we do like this in WebMethod it does not work the same as normal programming concept where a ref points to the same storage location of the calling variable.If we look carefully in the Proxy that .Net Generates we will find the f...(truncated)...
Running SmartCodeGenerator Projects with Cassini
(Indexed 2007-03-14):
With Cassini SCG Projects can be distributed very easily. Cassini is a mini web server written with 100% managed code C#, moreover Cassini is free. Cassini requires as an operating system either Windows 2000 or Windows XP; furthermore, the .NET Framework must also be installed. I am not going into further details of Cassini here, for more information please visit the Cassini Forum. All we need to know is Cassini is an independent web server and has the capability of running Asp.Net application l...(truncated)...
Get X509Certificate2 from a LDAP Server or Remote Machine
(Indexed 2007-03-11):
In Scenario1 I blogged how to get Certificate using the X509Store Class. Where I used something like this.X509Store store = new X509Store(StoreName.My, StoreLocation.CurrentUser); But after spending a bit of time with the X509Store I realized it has limitations. The StoreLoacation enum has only 2 options: CurrentUser: The X.509 certificate store used by the current user. LocalMachine: The X.509 certificate store assigned to the local machine. But I wanted to Load Certificate from a Remote LDA...(truncated)...
.Net 2.0 Cryptography Implementation - Scenario 1
(Indexed 2007-02-28):
I am playing with .Net2.0 Cryptography, and want to Implement different scenarios. Let me start with this one and please comment if you know of a better solution.Scenario 1: I want to setup a Public Key Interface, where Sender signs a Message using Senders Certificate and then Encrypts / Envelops it using Recipients Certificate and then Send the Encrypted Message. Solution: I am writing a Sender WebApplication where on click of a Button, Recipients Certificate is downloaded from a WebService St...(truncated)...
Recovery of Community Server / Asp.Net Membership Password
(Indexed 2007-02-23):
2 days back I installed Community Server 2.1 (SP2) with hosting provider webhost4life. They have a very handy Pre Installed Community Server Thing... Just 2 clicks and you get the Community Server Installed...All was going ok and I was very happy with this new hosting provider and about to test the emailsettings so I put the smtp details as provided by the hosting provider and then logged off. Pressed forgot password link and wanted to test whether the forgot password email sending option is wor...(truncated)...
List of RPC Ping for Blog
(Indexed 2007-02-21):
source: http://blog.davestechshop.net/Matt Ridings has a nice list of blog ping services he calls, "Ultimate List of RPC Ping Services For Your Blog". Use this list to get the word out that you have posted something new on your blog.Here is the list. All credit goes to Matt, and I'm sure he would appreciate a comment on his blog if you find this list useful. I'm simply passing along his good work.As Matt says, "Check to see if your blogging tool or software requires a separator (such as a semic...(truncated)...
.Net Cryptography related Resources and Links
(Indexed 2007-02-20):
Here are some good Cryptography related resources.Cryptography Overviewhttp://msdn2.microsoft.com/en-us/library/92f9ye3s.aspxNew and improved Security in the .Net Framework2.0 http://msdn2.microsoft.com/en-us/library/aa480472.aspx the examples are very useful Protect Private Data with the Cryptography Namespaces of the .NET Frameworkhttp://msdn.microsoft.com/msdnmag/issues/02/06/crypto/ should help you get an insight on .NET Cryptography essentials. Walkthrough Creating a Cryptographic Applicat...(truncated)...
SmartCodeGenerator CTP2.6 Uploaded and 2 articles at Code Project
(Indexed 2007-02-16):
SmartCodeGenerator fans the CTP 2.6.0 has been uploaded to CodePlex. This latest version remembers the entered values on the custom properties and does not require you to retype the property values repeatedly everytime you run the application. I hope this will make codegeneration and debugging experience more simpler. Also Uploaded 2 Articles at Code Project, but still in the Unedited Section. Hope Code Project will move them to the right section soon. This article demonstrates how to use SCGSma...(truncated)...
MSMQueuing from .Net for VB(legacy). Use ActiveXMessageFormatter
(Indexed 2007-02-13):
I was Queuing a Serialized object in MSMQ. But soon realized that VB (legacy) do not like the format. public void QueueJob(Job job, string destinationQueue, string messageLabel) { try { // open the queue MessageQueue mq = new MessageQueue(destinationQueue); // set the message to durable. mq.DefaultPropertiesToSend.Recoverable = true; // send the job object mq.Send(job, m...(truncated)...
Asp.Net Caching Resources and Links
(Indexed 2007-02-07):
Asp.Net Cachinghttp://msdn2.microsoft.com/en-us/library/xsbfdd8c.aspx Asp.Net Caching Featureshttp://msdn.microsoft.com/library/default.asp?url=/l...(truncated)... Asp.Net Quickstart- Caching for performancehttp://quickstarts.asp.net/QuickStartv20/aspnet/d...(truncated)... Video: How Do I Make use of Cachinghttp://www.asp.net/learn/videos/view.aspx?tabid=63&id=42 Video: How Do I make Greater use of Cachinghttp://www.asp.net/learn/videos/view.aspx?tabid=63&id=41 ArticlesImplement Custom Cache...(truncated)...
Design Pattern for P/Invoke Dll from c#
(Indexed 2007-02-05):
http://www.pinvoke.net comes with handy C# /VB.Net signatures for invoking with core Win32 API.for example if we search for MessageBox in http://www.pinvoke.net we get the following result:C# Signature (Original):[DllImport("user32.dll", CharSet=CharSet.Auto)]public static extern uint MessageBox(IntPtr hWnd, String text, String caption, uint type);This is the bare minimum and we can use this straight way in our application but I always prefer to write a Wrapper around it. Which turns into someth...(truncated)...
Distributing data to other systems and in this instance I used MSMQ
(Indexed 2007-01-25):
I remember last year I designed a asp.net application where I had couple of Webforms to collect data and I was storing in the database.Ie. Webform facilitates insert, Update and Delete of Person and allow to set reminders for the person, which is later on send to him via Email, SMS and other ways... This year the client wanted one of their legacy application to pickup the reminders and display on is own calendar.... but the catch is the the legacy app will use its own database structure and its ...(truncated)...
Use Reflection wisely and be aware of the list Costly functions vs the fast ones
(Indexed 2007-01-22):
Here is the list of Fast and Light Functions and Costly Functions. So when you write your next piece of codes be more careful to choose the right methods. Fast and Light FunctionstypeofObject.GetTypetypeof == Object.GetTypeType equivalence APIs (including typehandle operator overloads)get_Moduleget_MemberTypeSome of the IsXX predicate APIsNew token/handle resolution APIs in the .NET Framework 2.0 Costly FunctionsGetXX APIs (MethodInfo, PropertyInfo, FieldInfo, and so on)GetCustomAttributesType....(truncated)...
Links to Microsoft Visual Studio Documentation and Related Resources....
(Indexed 2007-01-22):
Source MSDN Blogs: http://blogs.msdn.com/vsdocs/archive/2007/01/22/links-to-mic...(truncated)... Links to Microsoft Visual Studio Documentation and Related Resources Note: These links are subject to change at any time. Official Documentation for Visual Studio Visual Studio 2005 documentation starting page: http://msdn2.microsoft.com/en-us/library/ms269115(VS.80).aspx Visual Studio 2005 SDK documentation starting page: http://msdn2.microsoft.com/en-us/library/bb166441(VS.80).aspx Visual ...(truncated)...
Improving Reflection Performance
(Indexed 2007-01-22):
Some tips to keep in mind when using reflection....Source MSDN: http://msdn.microsoft.com/msdnmag/issues/05/07/Reflection/de...(truncated)... Reflection Performance There are various reasons why an application can't define a static extensibility contract, but it's usually a result of the flexibility the architect built in. Here are some ways to reduce some of the cost of reflection and of the MemberInfo cache. Avoid using Type.InvokeMember to call late-bound methods Type.InvokeMember is the s...(truncated)...
CLS - Common Language Specification, consider making your code CLS compliant.
(Indexed 2007-01-18):
Making your code CLS compliant is important, as this confirms that the classes should only expose features that are common to the CLS. So anyone using your classes and writing in a different programming language do not face any issues. To make sure, CLS compliancy is checked by the C# compiler we have to explicitly define the CLSCompliantAttribute.Marking inside AssemblyInfo.cs class===================================[assembly: CLSCompliant(true)] Marking an entire assembly as CLS compliant ====...(truncated)...
Testing Bandwith Speed
(Indexed 2007-01-17):
Its not as hard as it sounds anyone can do this by throwing some javascript. Most of the speed test sites that are available, downloads a predefined file (a jpg or something with known size) and then uses javascript to find the time elapsed and then calculate the result.In one of the popular site I saw something like this: function RightNow(){time = new Date();return time.getTime();} function CalculateSpeed(timeStart){timeEnd = RightNow();timeElapsed = (timeEnd - timeStart)/1000 - 0.15;kbytes ...(truncated)...
Taking Asp.Net2.0 applications offline with app_offline.htm
(Indexed 2007-01-16):
Asp.Net 2.0 comes with this cool feature, just place a file named app_offline.htm in the root folder of your web application, this will shut-down the application and also unload the application domain from the server, not only this it will stop processing any respond to all requests for dynamic pages and send back the content of app_offline.htm file.So in the app_offline.htm you can put "Under Construction", "Will come back in 5 min" etc. When you remove app_offline.htm file again the next reque...(truncated)...
Free Asp.Net Goodies
(Indexed 2007-01-15):
Some zero cost resources for asp.net develpers.source: http://www.code-magazine.com/article.aspx?quickid=0411041&page=1 OpenSourceProjects:SmartCodeGenerator(www.codeplex.com/smart...(truncated)... A free opensources code generation tool that uses pure asp.net to generate your text base output.DotNetNuke (www.dotnetnuke.com): A content management portal.nGallery (www.ngallery.org): Is an image gallery project written in C#. .Text (dottextwiki.scottwater.com): blogging engine written in C#Communi...(truncated)...
Asp.Net Ajax Debugging
(Indexed 2007-01-14):
Dan Walhin made this good video tutorial to show us steps needed to debug client side script : Video : Debugging ASP.net Ajax Application with Visual Studio 2005 Basically, The following steps need to be performed Step1: Need to tweak IE to enable client script debugging :Go to Tools > Internet Options > Advanced and uncheck both "Disable script debugging (Internet Explorer)" and "Disable script debugging (Other)" .Step2:Then in your client code where you want the breakpoint write debug.fail("...(truncated)...
Some Useful Asp.Net Ajax /xml Tutorial Videos to let you start quickly
(Indexed 2007-01-14):
All the following Videos are available in this bloghttp://blogs.interfacett.com/dan-wahlins-blog/ Video: Viewing Albums with WPF/E and ASP.NET AJAX Video: Edit XML Data with the XmlDocument Class Video: Using XPath with the XmlDocument Class Video: Parsing XML with the XmlDocument Class Video: Debugging ASP.NET AJAX Applications with VS.NET 2005 Video: Calling Web Services with ASP.NET AJAX and JavaScript Video: Using the ASP.NET AJAX UpdatePanel, Triggers and PageRequestManager Video: Minimiz...(truncated)...
Code blocks formatting in blogs
(Indexed 2007-01-12):
This GREAT! code formatter lets you format your code blocks. It's simple, you have to copy/paste into a text box, select the technology c#, VB, HTML/ASPX, XML also you can turn on/off line numbers, and alt line back colors. The Service is available here. http://www.manoli.net/csharpformat/ the source code is also available in the site.[Image][Image]
Just Uploaded SmartCodeGenerator CTP 2.4.0 at CodePlex
(Indexed 2007-01-04):
Just Uploaded SmartCodeGenerator CTP 2.4.0 at CodePlexSmartCodeGenerator CTP 2.4, 4 Jan 2007 contains support for .Net2.0 and now you get out of the box DBSchemaProvider for MSSQL2000, MSSQL2005, Oracle and MySqlAlso written and quick example using the DBSchemaProviders....All this is downloadable from here:http://www.codeplex.com/smartcodegenerator/Release/Proj...(truncated)... ll appreciate if you post your thoughts, suggestion, advise for this project.[Image][Image]
MS SQL 2000 Schema Discovery Queries
(Indexed 2007-01-03):
Below is the list of queries that I am upto with my MSSql2000DBSchemaProvider for SmartCodeGenerator. I thought this might be useful and quick reference for others too.GetTables string cmdText = string.Format(@"Select TABLE_NAME, TABLE_SCHEMA OWNER, REFDATE CREATE_TIME FROM INFORMATION_SCHEMA.TABLES , sysobjectswhere Table_Name = sysobjects.[name] and TABLE_CATALOG = '{0}' AND TABLE_TYPE = 'BASE TABLE' ORDER BY 1", database.Name);GetTableColumnsstring commandText = string.Format(@"Select COLUMN_...(truncated)...
I have been awarded MVP for Year 2007
(Indexed 2007-01-02):
Happy New Year Everyone. I just found this morning I have been awarded MVP ( Microsofts Most Valuable Professional ) Award for Year 2007 for my contribution to the Visual c# Community.My MVP Profile: https://mvp.support.microsoft.com/profile/default....You might be also interested to see the following links:My Blog: http://www.geekswithblogs.net/shahedMy Current Open Source Project at CodePlex : SmartCodeGenerator My Articles at CodeProject:1. Ready-to-use Mass Emailing Functionality with C#, .N...(truncated)...
WinForms UI Thread Invokes
(Indexed 2007-01-01):
WinForms UI Thread Invokes: An In-Depth Review of Invoke/BeginInvoke/InvokeRequredA very good readhttp://weblogs.asp.net/justin_rogers/articles/1263... Marshalling the execution of your code onto the UI thread in the Windows Forms environment is critical to prevent cross-thread usage of UI code. Most people don't understand how or when they'll need to use the marshalling behavior or under what circumstances it is required and when it is not. Other users don't understand what happens when you u...(truncated)...
SmartCodeGenerator - DBSchemaProviders for MySql and Oracle
(Indexed 2007-01-01):
The SourceCode of Implemented DBSchemaProviders for Oracle and MYSql was mising in the zip file, sorry for the inconvenience.The correct files are uploaded and is downloadable.http://www.codeplex.com/smartcodegenerator/Rele...(truncated)...
How to write DBSchemaProvider for SmartCodeGenerator
(Indexed 2006-12-10):
SmartCodeGenerator Implements Asp.Net ProviderPattern and DBSchemaProvider class comes with the following signature.public abstract class DBSchemaProvider : ProviderBase{ // Methods protected DBSchemaProvider(); public abstract ParameterSchemaCollection GetCommandParameters(CommandSchema command); public abstract CommandResultSchemaCollection GetCommandResultSchemas(CommandSchema command); public abstract CommandSchemaCollection GetCommands(DatabaseSchema database); ...(truncated)...
Database Schema Provider for SmartCodeGenerator
(Indexed 2006-12-10):
Last couple of days I was busy writing the DBSchemaProvider for SmartCodeGenerator. I have kept the provider signature very similiar to CodeSmiths SchemaExplorer. As a result the current SchemaProviders that available for CodeSmith can be incorporated with SmartCodeGenerator with very minor changes. I already converted The SchemaProviders for MYSQL and Native Oracle and this will ship with the next release CTP2.2. Here is the signature for SmartCodeGenerator.DBSchemaProvider : public abstract Pa...(truncated)...
SmartCodeGenerator CTP2.1 with UI features for enum, stringcollection and mandatorystring.
(Indexed 2006-12-07):
SmartCodegenerator CTP 2.1 includes 3 new UIProperties and now supports enum, StringCollection and ScMandatoryString.You will notice the following additional nodes in the PropertyAndPropertyMaps.xml file. ScEnum ScEnumUIProperty.ascx SmartCodeGen.WebUtil.PropTypes.StringCollection ScStringCollectionUIProperty.ascx ScMandatoryStringProperty ScMandatoryStringUIProperty.ascx Please download the latest CTP2.1 VisualStudioTemplates from CodePlex.[Image][Image]
Set Enum Value with reflection .Net1.1 and .Net2.0
(Indexed 2006-12-06):
While trying to set value for enum via Reflection I discovered .Net2.0 is much smarter in setting values.In .Net2.0 the following works: Int32 property = int.Parse("20");if (propertyInfo.CanWrite){ this.propertyInfo.SetValue(ParentPage.TheProperties, property, null);} but this same code as above will not work in .Net1.1 and will throw a cast exception. Here is the workaround for .Net1.1, where we explicitly do Enum.ToObject(...) . ie.object property = int.Parse("20");object newEnumValue = Enu...(truncated)...
How to Get Enum Values with Reflection in C#
(Indexed 2006-12-06):
This came up when I was writing a UIProperty for SmartCodeGenerator, The combo box should display all the available enum options in a DropDownList for the enduser to choose from them.So if someone defines a enum like this:public enum MyEnum{ ten = 10, twenty = 20 , thirty = 30}and a class using the enum as one of its property, ie. public class TheProperties{ public TheProperties( ) { //Please Assign Default Values here this.myVar = MyEnum.twenty; } private MyEnum testEnumProp; ...(truncated)...
Asp.Net Regular Expression API
(Indexed 2006-12-04):
This link describes the regular expression class that parses asp.nethttp://msdn.microsoft.com/library/default.asp?url=... Regular Expression Classes AspCodeRegex Class Provides a regular expression to parse an ASP.NET code block. AspExprRegex Class Provides a regular expression to parse an ASP.NET expression block. CommentRegex Class Provides a regular expression to parse an ASP.NET comment block. DatabindExprRegex Class Provides a regular expression to parse an ASP.NET data-binding expressi...(truncated)...
SCG Template for CSharpSortedList Uploaded to community.smartcodegenerator.com
(Indexed 2006-12-04):
I have uploaded this SmartCodeGenerator Template that generates a csharp class, that implements IClonable, IDictionary. This SCG Template can be downloaded here. Here is a sample output: // ============================================================...(truncated)... Generated by SmartCodeGenerator. // // website www.smartcodegenerator.com, email shahed.khan@gmail.com// ============================================================...(truncated)... using System;using System.Collections; namesp...(truncated)...
MandatoryStringUIProperty available at the SCG Community site.
(Indexed 2006-12-04):
I have uploaded the MandatoryStringUIProperty at community.smartcodegenerator.com and is available to download.This UIProperty will force user to enter text in the textbox. To Include this UIProperty in your project please follow these steps:======================================================...(truncated)... Copy the files ScMandatoryStringUIProperty.ascx and ScMandatoryStringUIProperty.ascx.csin your Projectcs PropertyControls folder. Step2: Copy the file ScMandatoryStringProperty.cs in yo...(truncated)...
SCG Template to implement IDictionary, ICollection, IEnumerable, IClonable and Hashtable methods.
(Indexed 2006-12-04):
I uploaded a new SCG Temple which generates class that implements the following interfacesIDictionary, ICollection, IEnumerable, ICloneableAnd Hashtable methods.This Example has same output as Codesmith template file "CSHashtable.cst":Example:public class TestClass : IDictionary, ICollection, IEnumerable, ICloneable{}This template is avaialble to download from smartcodegenerator community site.http://community.smartcodegenerator.com/files/folders/s...(truncated)...
Introducing new UIProperty in SmartCodeGenerator
(Indexed 2006-12-02):
The current downloads upto CTP2.0 ships with only 4 UIProperty for the .Net types (int, string, boolean and ScSqlTablesProperty) but it is very easy to introduce your own UIProperty for any .Net Types. Lets jump into writing one:UIProperty: UIProperty is User Interface that is automatically generated in the web page during the Template Generation process. When you declare a property in TheProperties class a User interface to collect data from the user is automatically generated for you. For exam...(truncated)...
SmartCodeGenerator CTP2.0 released with .Net1.1 and .Net2.0 support.
(Indexed 2006-12-02):
I am glad to inform the release of SmartCodeGenerator CTP 2.0 in both .Net1.1 and .Net2.0. As a result Templates can be generated both in VS2003 and VS2005. Please download from Codeplex:http://www.codeplex.com/Release/ProjectReleases.as...Change Notes:1. I am not using the Asp.Net Profile object in the core api to generate user interface, instead introduced a Custom class "TheProperties". Please refer to tutorials at www.smartcodegenerator.com for more details.There are some other changes made...(truncated)...
SmartCodeGenerator for Vb.Net Developers
(Indexed 2006-12-02):
Good News for the Vb.Net developers.I recently added VSTemplate for VBVSTemplate: SCGCTP2.0vstemplateVbDotnet2 So you can start writing templates in Vb.Net as well.To work with Visualstudio2005TemplatesVb ==========================================Copy SmartCodeGeneratorVb.zip from Visualstudio2005_Templates folder to your My DocumentsVisual Studio 2005TemplatesProjectTemplates folder.Copy SmartCodeGeneratorTemplateVb.zip from Visualstudio2005_Templates to your My DocumentsVisual Studio 2005Temp...(truncated)...
Consider using XmlTextReader over XmlDocument
(Indexed 2006-11-29):
Do you know XmlDocument or XPathDocument creates an in memory representation of the entire XML document. And this typically consume memory equivalent to three or four times of the size of the XML document on disk.On the other hand XmlTextReader, loads only 4KB (kilobyte) buffer into memory and give better performance and scalability.[Image][Image]
SmartCodeGenerator (ASP.NET 2.0) CTP1 uploaded at Codeplex
(Indexed 2006-11-29):
The CTP1 of SmartCodeGenerator can be also downloaded from CodePlex.http://www.codeplex.com/Release/ProjectReleases.as... And the homepage for this project at Codeplex ishttp://www.codeplex.com/smartcodegeneratorI am also in the process of building the community site.http://community.smartcodegenerator.com/ (very early stage).[Image][Image]
Some quick tips for Asp.Net Application Performance Tuning
(Indexed 2006-11-28):
Sometimes when you want to quickly tune asp.net application the following points can be checked (not in any particular order) as it requires minimal code changes to the application. 1. Analyze Database while running the application, via sql profiler. Identify which stored procedures are called and whether the database tables are properly indexed. And queries not performing Full table scan for any case. 2. Recommended Threading Settings for Reducing Contention Configuration setting Def...(truncated)...
Handy Regex expression to validate/format string
(Indexed 2006-11-27):
Found these handy collection of regex expressions in this site:http://rgagnon.com/jsdetails/js-0063.html. I did not test all of them though.... [Image] Use regular expressions to validate/format a stringThis is an impressive collection (that I found somehere on the Net) of various functions to validate or format string in Javascript. The code is very compact. /***********************************************************...(truncated)... RegExpValidate.jsDESCRIPTION: This file contains a library o...(truncated)...
SmartCodeGenerator (Asp.Net) at CodePlex
(Indexed 2006-11-27):
Hi Guys I have started moving SmartCodeGenerator to CodePlexhttp://www.codeplex.com/smartcodegenerator For the time being please stick to the old links:Tutorials : http://www.smartcodegenerator.com GotDotnet Link: http://www.gotdotnet.com/codegallery/codegallery.aspx?id=cdb...(truncated)... Myblog: http://www.geekswithblogs.net/shahed [Image] Founder SmartCodeGeneratorShahed Khan"Code Generation has never been this easy"[Image][Image]
SmartCodeGenerator (asp.net2.0) All 4 Examples/Tutorials at one place.
(Indexed 2006-11-25):
[Image] All of the 4 Examples those will familiarize you with SmartCodeGenerator are compiled together and uploaded herehttp://www.smartcodegenerator.com/ And please download the SmartCodeGenerator CommunityDrop1 from Gotdotnet.[Image][Image]
Example 4: SmartCodeGenerator (asp.net 2.0) Generating Class from SqlServer TableSchema
(Indexed 2006-11-25):
Download the CommunityDrop1 from here.Example 4 Generating Class from SqlServer TableSchema Step1 Opening Existing Template Open Example4 from Example_Projects folder, as a website project in Visual Studio 2005.[Image]Step2 Launching the Generator Run the project you have opened from Visual Studio 2005 and this will display the default.aspx page. [Image] Put your connection string in the connectionstring field and Click Scan Button. If the connectionstring is ok and this can connect to the dat...(truncated)...
Example 3: SmartCodeGenerator (asp.net 2.0) Writing your first template
(Indexed 2006-11-25):
Example 3 Writing your First Template Objective We will write a template which will take two properties classname and propertyname and generate code like this based on the customized values entered for the properties.public class TestClass { public TestClass() { //Add constructor here } private string testproperty public string TestProperty { get { return testproperty; } set { testproperty = value; } } } Step1. Installing VS2005 Project and Item Template for Sm...(truncated)...
Example2: SmartCodeGenerator (asp.net 2.0)and the Profile Object
(Indexed 2006-11-25):
Example2: Generating Code from existing project/template. And getting familiar with the Asp.Net Profile object. Step1 Opening Existing Template, Launching and Generating Code. Open Example2 from Example_Projects folder, as a website project in Visual Studio 2005.[Image] Step2 Launching the Generator Run the project you have opened from Visual Studio 2005 and this will display the default.aspx page. [Image] Notice the property1 and the textbox to enter value. The properties lets you customize t...(truncated)...
Example1: SmartCodeGenerator Familiarization
(Indexed 2006-11-25):
Example1 Makes you familiar with SmartCodeGenerator.Generating code from existing project/template. Step1 Opening Existing Template Open Example1 from Example_Projects folder, as a website project in Visual Studio 2005.[Image]Step2 Launching the Generator Run the project you have opened from Visual Studio 2005 and this will display the default.aspx page. [Image] Notice the property1 and the textbox to enter value. The properties lets you customize the generated code. Here we are collecting ...(truncated)...
Asp.Net Performance: Use explicit cast instead of using Eval
(Indexed 2006-11-23):
I have come through lots of examples in the web using DataBinder.Eval but if we go and see whats happening under the hood, we will find Eval uses reflection to evaluate argument passed. But explicit casting can reduce the cost of reflection. Imagine if there is 30 rows and each row has 6 Eval calls. So there will be calls to Eval 180 times. And we should take this pretty seriously. So you must be thinking what to do. Hey we can simply do something like this and improve significant performance. ...(truncated)...
Asp.Net Tools for Developers
(Indexed 2006-11-23):
Fiddler HTTP DebuggerHTTP debugging proxy Lutz Roeder's .NET Reflector.NET assembly browser, explorer, analyser and decompiler FxCop.NET best-practice code analyser C# Snippet CompilerLightweight C# code snippet compiler Sysinternals DebugViewMonitors debug output on a local or remote computer WinMergeVisual text file differencing and merging tool GhostDocVisual Studio add-in that automatically generates XML documentation CopySourceAsHtmlVisual Studio add-in that copies syntax-highlighte...(truncated)...
Programmatically accessing Tracing info in Asp.Net 2.0
(Indexed 2006-11-21):
For enabling Tracing we normally Tweak the config file right.... But in asp.net 2.0 you can do a bit more... void Page_Load (object sender, EventArgs e){ Trace.TraceFinished += new TraceContextEventHandler (TraceHasFinished);} void TraceHasFinished (object sender, TraceContextEventArgs e) { foreach (TraceContextRecord traceContextRecord in e.TraceRecords) { Response.Write (traceContextRecord.Category + ""); Response.Write (traceContextRecord.Message + ""); ...(truncated)...
Asynchronous Calls in asp.net2.0
(Indexed 2006-11-20):
.Net Framework 2.0 makes life so easy with asynchronous calls from pages. I remember in asp.net1.x we had to do so much to achieve the same behaviour, but we are lucky that in asp.net2.0 its very easy. Again there are more than one ways to implement asynchronous calls in asp.net2.0 and you may be asking which pattern to use. The first way is to use the AddOnPreRenderCompleteAsyncAddOnPreRenderCompleteAsync ( new BeginEventHandler(BeginAsyncMethod), new EndEventHandler (EndAsyncMethod));Th...(truncated)...
Using Reflection to Get and Set values of Properties
(Indexed 2006-11-19):
The assembly that is generated for .Net Framework has metadata that describes the structure of the assembly and its classes. By using reflection we can investigate the structure of classes and the data that assembly holds dynamically at runtime. Couple of days back in this project that I am working I had to dynamically get/set values from/to properties of object. The following code will give you a flavor of what I did. To Get value=============== foreach (PropertyInfo info in myObject.GetType(...(truncated)...
Visual Studio 2005 File > Export Template
(Indexed 2006-11-19):
Custom templates are sometimes very handy. For example if your pages are inherited from a custom base page. Normally you would have to tweak your pages to fit your framework. Sometimes its even boaring to go and change the new pages added to the project again and again. Say your framework require all pages to inherit from . Then you have to change the codebehind of the new pages that you add to your project to something like this public partial class _Default1 : YourProject.BaseClassName Good ...(truncated)...
Batch Compilation Asp.Net
(Indexed 2006-11-16):
We are aware that the complition process of Asp.Net 1.x Web page has two phases.1. Code Behind files and other supporting classes compiled into an assembly.2. And Individual ASPX files are compiled at runtime in to temporary assemblies. This happens during the page request has been performed.So firstime when the user requests a page its slow. I have seen suggested approach like writing a precompile.aspx page which goes and fires requests [ (HttpWebResponse)myHttpWebRequest.GetResponse(); ] to in...(truncated)...
Cache Invalidation for Dynamic pages in Asp.net 2.0
(Indexed 2006-11-16):
Asp.net 2.0 supports database cache dependencies. So changes in the Tables data can be notified and cache can expire. This is a very handy feature. Here is how we can do this this means the cached page expires in 2 hours but also depends on database table. Any changes on the database table data will also invalidate the cache. Borrowed the following code from this link: Link to Improved Caching in ASP.NET 2.0 Output Cache Titles [Image][Image]
Deleting duplicate rows when there is no primary key
(Indexed 2006-11-12):
Deleting duplicate rows when there is no primary keyProblemEvery once in awhile a table gets created without a primary key and duplicate records get entered. The problem gets even worse when you have two identical rows in the table and there is no way to distinguish between the two rows. So how do you delete the duplicate record?SolutionOne option that SQL Server gives you is the ability to set ROWCOUNT which limits the numbers of records affected by a command. The default value is 0 which me...(truncated)...
.Net Role checks using programmatic, declarative and imperative techniques
(Indexed 2006-11-05):
.Net Role Checking Examples============================The following code fragments show some example role checks using programmatic,declarative, and imperative techniques.1. Authorizing Bob to perform an operation:Note: Although you can authorize individual users, you should generally authorize based onrole membership which allows you to authorize sets of users who share the same privilegeswithin your application._ Direct user name checkGenericIdentity userIdentity = new GenericIdentity("Bob");...(truncated)...
Asp.Net Working with Certificates for secure communication
(Indexed 2006-11-03):
source: http://www.aspnetpro.com/newsletterarticle/2006/10/asp200610...(truncated)... with CertificatesCreate, Access, and Employ Certificates in Your ApplicationsBy Michele Leroux Bustamante[Image][Image]
Ajax Toolkit Live Demo
(Indexed 2006-11-03):
If you havevn't seen and played with them yet... http://ajax.asp.net/ajaxtoolkit/You can see all the following control extenders live in action:Accordion AlwaysVisibleControlAnimationCascadingDropDownCollapsiblePan...(truncated)... (New!)DropShadowDynamicPopulateFilteredTextBoxHoverMenuModal...(truncated)... (New!)NoBot
Virtual University and Expert System (VUES)
(Indexed 2006-10-31):
By looking at the recent publications at daily star http://www.thedailystar.net/campus/2006/09/04/academic.htmI also am feeling good to dig the old memories of the first ever .Net application Virtual University and Expert System (VUES) that we developed 4 years back. visit www.aiub.edu to see it live.Omar also blogged about it...recently.http://msmvps.com/blogs/omar/archive/2006/09/2...(truncated)... used to do a lot of fun in our dedicated development room mainly network gaming. Command and Con...(truncated)...
Improving .Net Application Performance and Scalability
(Indexed 2006-10-31):
Reading all these is essential for all .Net Developers.source: http://msdn.microsoft.com/library/default.asp?url=/library/e...(truncated)... I, Introduction to Engineering for PerformanceThis part shows you how to apply performance considerations throughout your application life cycle and introduces fundamental performance and scalability concepts and terminology. Part I includes one chapter: Chapter 1, "Fundamentals of Engineering for Performance"Part II, Designing for PerformancePerformance mo...(truncated)...
10 Tips for Writing High-Performance Web Applications
(Indexed 2006-10-30):
Source: http://msdn.microsoft.com/msdnmag/issues/05/01/ASPNETPerformance/10 Tips for Writing High-Performance Web ApplicationsRob Howard ------------------------------------------------------------...(truncated)... article discusses: Common ASP.NET performance myths Useful performance tips and tricks for ASP.NET Suggestions for working with a database from ASP.NET Caching and background processing with ASP.NET This article uses the following technologies:ASP.NET, .NET Framework, IIS ------------...(truncated)...
.Net Feeds and other public pages in Pageflakes.
(Indexed 2006-10-19):
View .Net Feed at Pageflakes http://www.pageflakes.com/buddhima.ashx?page=1075019&moduleKey=1309At pageflakes anyone can design a similiar page and publish them. Anyone can integrate all the feeds he/she is interested and also can publish them if one wishes. How cool is that!!The public pages section at Pageflakes.will give you a list of all public pages available http://www.pageflakes.com/Community/Pages/Page.aspxHere is one public page for Digghttp://www.pageflakes.com/james.simm.ashx?page=4...(truncated)...
MSSQLTips
(Indexed 2006-10-16):
MSSQLTips.com is your resource for daily SQL Server tips brought right to you. Each issue includes only one new tip and something that you can use immediately. [Image][Image]
More Sharepoint resources Links
(Indexed 2006-10-10):
In Addition to the links that I posted previouslyhttp://geekswithblogs.net/shahed/archive/2006/09/0...(truncated)... are some more useful linksSource: http://www.sharepointblogs.com/mkruger/archive/2005/05/05/Sh...(truncated)... SharePoint Web Parts (3rd Party)ActiveX Scripting Web Part (Simon Mourier) AD Management Web Part (Fabian) Alert Manager, Subweb Viewer Web Parts (Mart Muller) Avail Lists & Libraries (Sig Weber) Blogparts (Steen Molberg) Breadcrumb Site Navigation Web Part Calculator & ...(truncated)...
Easy RSS Search
(Indexed 2006-10-08):
Here is a Mash-it-up with ASP.NET AJAX Contest winners art work, Easy RSS Search.http://rsssearch6-1.at.vwdhosting.net/[Image][Image]
Generics FAQ and Fundamentals
(Indexed 2006-10-08):
Generics FAQ and Fundamentalshttp://msdn.microsoft.com/library/default.asp?ur...(truncated)...
Msdn Nuggets Search and Download Page
(Indexed 2006-10-05):
To Search and Download MSDN Nuggets use this page.http://www.microsoft.com/uk/msdn/events/nuggets.aspxMSDN NuggetsDon't have the time to read a 10-page how-to article or watch a full length webcast? Try an MSDN Nugget, a webcast that takes you step-by-step to discovering new functionality or exploring a hot developer topic, all in 10-15 minutes. View them online now or download for later reference.[Image][Image]
High Level White Papers on .NET Framework 3.0 Technology Published
(Indexed 2006-10-01):
High Level White Papers on .NET Framework 3.0 Technology Publishedhttp://blogs.msdn.com/pandrew/archive/2006/09/12/75...(truncated)...
.Net Articles by David Chappel and Associates
(Indexed 2006-10-01):
http://www.davidchappell.com/articles/index.html[Image] [Image] [Image]White PapersApplication Development Trends Columns, 2000-2004InformIT Columns, 2001-2002Component Strategies Columns, 1997-1999 Miscellaneous Articles White Papers[Image]Introducing Indigo: An Early LookUnderstanding BPM Servers Understanding BizTalk Server 2004 Application Development Trends Columns, 2000-2004[Image]Defining “Service”: A Pragmatic View The End of .NET vs. J2EE Take Your Pick: Business Pr...(truncated)...
Write your own Code Generator or Template Engine in .NET
(Indexed 2006-09-27):
I am glad to share my latest article at code project..Write your own Code Generator or Template Engine in .NETAbstractThis paper demonstrates building a code generator, template engine, template parser, or template processor in .NET. The demo implementation uses cutting edge .NET technologies available today such as C# .NET 2.0, MS Provider Pattern, Enterprise Library January 2006, CodeDom etc.IntroductionIf you have used Code Smith or similar tools, you may be wondering how this type of tools w...(truncated)...
SqlReader returning null: silly mistake to avoid while debugging
(Indexed 2006-09-20):
Today I was trying to debug this application. Where the reader is returning null even though I was passing the correct number of parameter and correct values.the C# code looks something like thisCommonCommand cmd = new CommonCommand(); cmd.Command = GetSPCommand( GETCAREPROVIDERTYPEBYDESCRIPTION ); using( cmd.Command ) { AddParameters( cmd.Command, pVarChar( CareProviderTypeBase.Property_Description ,20 ,description ) ); return GetOb...(truncated)...
Design Time Debugging during server control development in asp.net2.0 in Visual Studio 2005
(Indexed 2006-09-18):
Design Time Debugging during server control development in asp.net2.0 in Visual Studio 2005 source: http://brennan.offwhite.net/blog/2006/08/30/design-time-debu...(truncated)...
Snippet Compiler for all .Net Developers
(Indexed 2006-09-14):
Description: Snippet Compiler compiles snippets! It allows to test a small .net code. This tool can be incredibly usefull in cutting down the time taken to experiment with a .net code. Here are its features : Compiles and runs single or multiple C#, VB.NET and ASP.NET snippets; Optionally builds WinFormEXEs, console EXEs or DLLs; The user can store a library of templates; Displays compile errors, including the red squiggles; IntelliSense for static members and method signatures, as well as const...(truncated)...
HealthMonitoring Resources for asp.net2.0
(Indexed 2006-09-11):
ASP.NET 2.0 introduced a new feature which is called Health Monitoring. Health Monitoring allows you to have the information about your website.Resources for healthmonitoring in asp.net2.0:http://msdn2.microsoft.com/en-us/library/2fwh2ss9...(truncated)...
Mass Emailing Functionality with C#, .NET 2.0, and Microsoft SQL Server 2005 Service Broker'
(Indexed 2006-09-09):
Probably this is the FIRST ever .Net Technical article (Or probably IT technical article) written in the WORLD, in a (chat) conversation style. Please Let me know if I am wrong.Mass Emailing Functionality with C#, .NET 2.0, and Microsoft® SQL Server 2005 Service Broker' http://www.codeproject.com/cs/internet/smartmassemail.asp [Image][Image]
Implementing Message Priority in SQL Service Broker
(Indexed 2006-09-05):
source: http://blogs.msdn.com/rogerwolterblog/archive/2006/03/11/549...(truncated)... Priority Message Priority(Who’s on First?) Another question I have been asked more times than I can remember is “why doesn’t Service Broker have message priority?” On one hand the answer is “of course Service Broker has message priority”. Every message has a priority column and messages are received in priority order by dialog. What Service Broker doesn’t have is a w...(truncated)...
Some Useful LINQ Resources
(Indexed 2006-09-04):
source: http://weblogs.asp.net/scottgu/archive/2006/09/01/Understand...(truncated)... posted two blog posts last weekend about using LINQ to easily perform data access against a database. Several people have asked me for more details on LINQ to SQL since then.Sahil Malik made some excellent posts earlier this summer that go into more detail about LINQ to SQL (aka DLINQ) and how it works. You can read his posts here:An Introduction to DLINQSetting Up a DataContext ClassQuerying for Data using D...(truncated)...
Sharepoint 2007 Resources and Links
(Indexed 2006-09-04):
source: http://weblogs.asp.net/sbchatterjee/archive/2006/09/04/Share...(truncated)... 2007 Resources &Important Links SharePoint v2007. Some links & resources listed here are well worth digging into:Amanda Murphy - SharePoint 2007 WeblogJOPX on SharePoint 2007Mark Kruger - SharePoint 2007 Resource ListHeather Solomon - SharePoint ResourcesJohn Milan - SharePoint BlogsHugh Pyle - Groove Development[Image][Image]
Whats New in System.Xml 2.0
(Indexed 2006-09-03):
A great article which shows all the new bits of xml in .Net 2.0Reading this is a must as using the new XmlReader, XPathDocument and all the new bits will have significant performance improvement over the past .Net1.1 technologies.http://msdn.microsoft.com/msdnmag/issues/06/09/...(truncated)...
Sql Server 2005: The session keys for this conversation could not be created or accessed. The database master key is required for this operation.
(Indexed 2006-08-31):
Today I was playing with the Sql Server 2005 Service Broker funcrionality and created MessageType, Queues, Services, Contracts as necessary and after trying to Send Messages I could not find anything in the Queue.After investigating further found that the Messages are all sitting in the sys.transmission_queue and with the following error.The session keys for this conversation could not be created or accessed. The database master key is required for this operation.After investigating further I re...(truncated)...
Enterprise Library June 2005 Instrumentation Issue
(Indexed 2006-08-30):
I started getting the following error in one of the site that I am recently installing ( win 2000, .Net 1.1)Access to performance data was denied to ASPNET as attempted from C:WINNTMicrosoft.NETFrameworkv1.1.4322aspnet_wp.exe Access to performance data was denied to ASPNET as attempted from C:WINNTMicrosoft.NETFrameworkv1.1.4322aspnet_wp.exeSystem.Ty...(truncated)... The type initializer for "Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation....(truncated)... threw an exception. ---> S...(truncated)...
Resources for Sql Server 2005 Service Broker
(Indexed 2006-08-28):
Introduction to Service Broker Programminghttp://msdn2.microsoft.com/ko-kr/library/ms171578...(truncated)... – Niels B. http://www.sqljunkies.com/WebLog/nielsb/archive/2005/12/27/17701.aspx GotDotNet Code Gallery http://www.gotdotnet.com/codegallery/codegallery.aspx?id=9f7...(truncated)... MSDN: Building the MSDN Aggregation System, by John Mollman: http://msdn.microsoft.com/msdnmag/issues/06/07/InsideMSDN/de...(truncated)... Studio Magazine: Program SQL Server 2005’s Service Broker ...(truncated)...
How to write a DCOM Server in C#
(Indexed 2006-08-22):
http://blogs.msdn.com/adioltean/archive/2004/06/18/159479.aspxHow to write a DCOM server in C# Well, why DCOM and not .NET Remoting? For one thing, DCOM offers a secure interprocess communication channel through TCP/IP... which .NET remoting doesn't have unfortunately. Also, a DCOM server can be hosted in almost any process, including Windows Services! The ideas are described below (this is pretty straightforward assuming you already know COM) 1) Your server process will expose a COM class facto...(truncated)...
Windows Service Deployment in .Net
(Indexed 2006-08-21):
One of my close friend was asking me today how to install a windows service that is written in .Net.I sent him couple of links quickly after searching google, and this may help others as well.http://csharpcomputing.com/Tutorials/Lesson22.htmhttp:/...(truncated)... if you are tired of installing and uninstalling a service while development here is another way I have done it using a bat file. Its worth having a look too, how I have created a installer for the win service.http://www.codeproject.com...(truncated)...
Http Headers programmatically using the HttpModule
(Indexed 2006-08-09):
source: http://idunno.org/displayBlog.aspx/2006080101Here is the original post.Scott Hanselman wrote today about P3P and adding headers, which got me thinking. For this site (however dead it is) I can control the actual server, so adding the P3P headers was easy. However I have a community site bubbling under and if it takes off it will be need to be moved somewhere professional and not my attic. With professional hosting comes that lack of control and the need to have a better way of adding hea...(truncated)...
Model View Presenter in asp.net
(Indexed 2006-08-09):
ASP.NET Supervising Controller (Model View Presenter) From Schematic To Unit Tests to Codehttp://haacked.com/archive/2006/08/09/ASP.NETSupervising...(truncated)... View Presenter with ASP.NEThttp://www.codeproject.com/useritems/ModelViewPresent...(truncated)... out the Model-View-Presenter patternhttp://128592.viewstate.codebetter.com/blogs/jeffrey....(truncated)... View Presenter by Martin fowlerhttp://www.martinfowler.com/eaaDev/ModelViewPresenter.htmlNote: Model View Presenter pattern is rec...(truncated)...
Some good articles on Asp.net
(Indexed 2006-08-09):
source: http://weblogs.asp.net/scottgu/archive/2006/08/09/August-9th...(truncated)... TopicsSending Email in ASP.NET 2.0: This is a great article from Scott Mitchell that demonstrates how to use the new System.Net.Mail APIs in .NET 2.0 to send email from an ASP.NET application.Sending Email in ASP.NET 2.0: HTML-Formatted Emails, Attachments, and Gracefully Handling SMTP Exceptions: This is a great follow-up article on email from Scott Mitchell that discusses some more advanced email scenarios us...(truncated)...
Web 2.0 Reference Centre ( CSS, Javascript, AJAX, XML etc..)
(Indexed 2006-08-07):
Web 2.0 Reference Centrehttp://www.programmableweb.com/referenceBest of the Webhttp://www.bobbyvandersluis.com/main/linkLibrary.php#c19[...(truncated)...
Setup and Deployment Project in VS.Net -Useful Links
(Indexed 2006-08-03):
Hi guys hope this will be useful to quickly get the idea of Setup and Deployment Project in VS.NetSetup and Deployment Projects Article Links============================================Deploying Applications and Componentshttp://msdn.microsoft.com/library/default.asp?url=...(truncated)... Deploying a Web Solutionhttp://msdn.microsoft.com/library/default.asp?url=/l...(truncated)... Walkthrough: Using a Custom Action to Create a Database During Installationhttp://msdn.microsoft.com/library/default...(truncated)...
LINQ and XLinq Patterns
(Indexed 2006-07-30):
http://blogs.msdn.com/ericwhite/archive/2006/04/26/584147.aspxLINQ and XLinq Patterns[Image][Image]
NUnit, MbUnit, VSTS Asserts List
(Indexed 2006-07-27):
NUnit and MbUnit Assertshttp://weblogs.asp.net/astopford/archive/2006/07/27/M...(truncated)... unit test asserts and MbUnithttp://weblogs.asp.net/astopford/archive/2006/07/27/VS...(truncated)...
Webservice basics
(Indexed 2006-07-26):
Understand Webservice betterhttp://msdn.microsoft.com/webservices/webservices/unde...(truncated)...
Debug in .Net
(Indexed 2006-07-10):
http://www.automatedqa.com/techpapers/net_debugging.asp[Image][Image]
Custom GridView Paging
(Indexed 2006-06-26):
http://www.unboxedsolutions.com/sean/archive/2005/12/28/818....(truncated)...
Creating Project Templates in VS
(Indexed 2006-06-21):
http://msdn2.microsoft.com/en-us/library/s365byhx(VS.80).asp...(truncated)...
Best Articles of Microsoft SmartPhone Programming
(Indexed 2006-06-13):
source:http://weblogs.asp.net/nleghari/articles/smartphone.aspxBest of Articles :: Microsoft Smartphone Programming [This (sort of) book is a collection of different articles combined under related chapters]Chapter 1: Introduction to the .NET Compact FrameworkFundamentals of Microsoft .NET Compact Framework Development for the Microsoft .NET Framework Developer What's New in Smartphone 2003 Develop for Windows Mobile 2003 for Smartphone Using the .NET Compact Framework An Introduction to Microso...(truncated)...
Hooking Windows Messages in .Net
(Indexed 2006-06-12):
http://www.devsource.com/article2/0,1895,1969408,00.asp[Image][Image]
Working with Windows Messages in .Net
(Indexed 2006-06-12):
http://www.devsource.com/article2/0,1759,1961574,00.asp [Image][Image]
Microsoft Win32 to Microsoft .NET Framework API Map
(Indexed 2006-06-09):
Microsoft Win32 to Microsoft .NET Framework API Maphttp://msdn.microsoft.com/library/default.asp?url=/librar...(truncated)... This article identifies the Microsoft .NET Framework version 1.0 or 1.1 APIs that provide similar functionality to Microsoft Win32 functions. One or more relevant .NET Framework APIs are shown for each Win32 function listed. The intended audience for this article is experienced Win32 developers who are creating applications or libraries based on the Microsoft .NET Framewo...(truncated)...
Difference between Mutex and Semaphore
(Indexed 2006-06-09):
Source: http://koti.mbnet.fi/niclasw/MutexSemaphore.htmlMutex vs. Semaphore, what is the difference?The Toilet Example (c) Copyright 2005, Niclas Winquist ;)Mutex:Is a key to a toilet. One person can have the key - occupy the toilet - at the time. When finished, the person gives (frees) the key to the next person in the queue.Officially: "Mutexes are typically used to serialise access to a section of re-entrant code that cannot be executed concurrently by more than one thread. A mutex object o...(truncated)...
Powerful Generics(C#) Libraries
(Indexed 2006-05-20):
C5 Generic Collection LibraryPowerCollections (by Wintellect, free sign up required)http://weblogs.asp.net/rosherove[Image][Image]
Understanding Generics
(Indexed 2006-05-15):
Here are some links which will give a quick introductionhttp://blogs.msdn.com/jeremykuhne/archive/2005/0...(truncated)...
Source Code for the Built-in ASP.NET 2.0 Providers Now Available for Download
(Indexed 2006-05-13):
http://weblogs.asp.net/scottgu/archive/2006/04/13/442772.asp...(truncated)...
CSS Control Adapter Toolkit for Asp.Net 2.0
(Indexed 2006-05-13):
http://weblogs.asp.net/scottgu/archive/2006/05/02/444850.asp...(truncated)...
ASP.NET Control Development
(Indexed 2006-05-02):
A Crash Course on ASP.NET Control Development: Design-Time Features and Capabilitieshttp://msdn.microsoft.com/asp.net/default.aspx?p...(truncated)... an .ascx User Control into a Redistributable Custom Controlhttp://msdn.microsoft.com/library/default.asp?url=/li...(truncated)...
Enumerating the XmlDataSource
(Indexed 2006-04-19):
Here is the cool piece of code to Enumerate XmlDataSource Tabular/Hierarchical:You have an XmlDataSource on your page and you wish to enumerate the items as tabular data private void EnumerateDataSource() { IDataSource ds = XmlDataSource1 as IDataSource; if (ds != null) { XmlDataSourceView xmlDsView = ds.GetView(String.Empty) as XmlDataSourceView; if (xmlDsView != null) { IEnumerator enumerator = xmlDsView.Select(DataSourceSelectArguments.Empty).GetEnumerator(); ...(truncated)...
Download Code Snippets
(Indexed 2006-04-06):
http://msdn.microsoft.com/vstudio/downloads/codesnippets/def...(truncated)... can download Huge list of CodeSnippets from the above link.......... Enjoy coding and codesnippets will make it more enjoyable......................[Image][Image]
A Good Example of Asp.net LoadControl with multiple parameters
(Indexed 2006-03-23):
source: http://codebetter.com/blogs/sahil.malik/archive/2006/03/05/1...(truncated)... inability of LoadControl to accept Constructor Parameters is a real pain . This post tellshow to get around of it.With UserControlswe are limited to calling something like - LoadControl("WebUserControl.ascx") ;Wouldn't it be nice ifwe could instead do ...LoadControl("WebUserControl.ascx",constructorparameter1, constructorparameter2, constructorparameter3 ...) ;So for instance, it would be nice if the following ...(truncated)...
Pageflakes Beta up and running (Very Interesting....)
(Indexed 2006-02-08):
Pageflakes Beta up and running. http://www.pageflakes.com?source=1c612566-cbf7-4f06-98e4-575...(truncated)... a Flake today and submit.. There is a huge list of community Flakes now. Anyone can participate and Refresh their AJAX skills. Its also a cool place to proove your Ajax skills. When you submit everybody will be able to see your work.... Cooool hah.I developed my first Flake entirely in VS2005 implementing Atlas technology. There is a developers document available on the site too...I most...(truncated)...
Web Service Security: Scenarios, Patterns, and Implementation Guidance
(Indexed 2006-01-26):
Web Service Security: Scenarios, Patterns, and Implementation Guidancehttp://www.gotdotnet.com/codegallery/codegallery.asp...(truncated)...
Atlas December Release Related Links
(Indexed 2006-01-14):
I am planning to post Atlas December Release Related Links here:Extending the AutoCompleteExtender http://aspadvice.com/blogs/garbin/archive/2006/01/02/14518.aspxThe December release do not work.Have a look at the Forums and everybody is talking about it.http://forums.asp.net/1170146/ShowPost.aspxhttp://forums....(truncated)... Now I am not planning to switch to December Release as long as it is stable.[Image][Image]
Video on how to use Atlas Server Control
(Indexed 2006-01-11):
This video is simple and good. Discuss how to use Atlas Server Controls.http://xmlforasp.net/CodeSection.aspx?csID=116An Atlas tutorialhttp://geekswithblogs.net/claeyskurt/archive/2005/12...(truncated)...
Tell a Friend Flake at Pageflakes (www.pageflakes.com) using .Net2.0 and Atlas
(Indexed 2006-01-11):
Recently I posted my Tell a Friend Flake at Pageflakes (www.pageflakes.com). You can add this Flake from the Add Content.Pageflakes is a personalized startpage that lets you read news and blogs, start Web searches, maintain an address book, manage To-Do-Lists and much more, all from one page.Try writing your own Flake and post it to www.pageflakes.com. There is also a Developers documentation available http://www.pageflakes.com/devdoc/developer_documentation.htm...(truncated)... isbuiltusing the...(truncated)...
Debug Javascripts
(Indexed 2006-01-04):
Finding problem in JavaScript is pretty difficult. We use alert(..) to seewhether anything is wrong.Here's a different approach to use log4net style logging in JavaScript.http://www.alistapart.com/articles/jslogging[Image][Image]
Visual SourceSafe Articles and Walkthroughs
(Indexed 2005-12-28):
Visual SourceSafe Articles and Walkthroughshttp://www.ezds.com/html/ss_info_index.htmlusing Visual Sourcesafe 6.0http://msdn.microsoft.com/library/default.asp?url=/librar...(truncated)... checkout and checkin (Read this article to understand Label, Cloak, Pin, Share, Branch, Merge Branch)http://software.ericsink.com/Beyond_CheckOut_and_CheckIn.html [Image][Image]
Flexible and Plug-in-based .NET Application using Provider Pattern
(Indexed 2005-12-22):
Flexible and Plug-in-based .NET Application using Provider Patternhttp://www.codeproject.com/dotnet/smartjobmanager.asp...(truncated)...
Asp.net 2.0 GridView Examples
(Indexed 2005-12-22):
Asp.net 2.0 GridView Exampleshttp://msdn.microsoft.com/library/default.asp?url=/l...(truncated)...
