Its very simple, free and SEO Friendly. Submit Now....
Saturday, June 13, 2009
Using the Silverlight Accordion Control
LINQ to SQL and ADO.NET Data Services: Working Together
Url Rebasing in ASP.NET 2.0
Using ASP.NET 3.5's ListView and DataPager Controls: Editing Data
The GridView and DetailsView controls offer built-in editing functionality that can be turned on with the tick of a checkbox. Without writing a line of declarative markup or server-side source code, the page developer gets a decent out of the box editing interface. Namely, each field in the GridView or DetailsView is rendered in its editing interface; BoundFields display a TextBox control while CheckBoxFields display an enabled checkbox. Moreover, a CommandField is added, which displays t...Full Article.
What does the optimize switch do?
I was asked recently exactly what optimizations the C# compiler performs when you specify the optimize switch. Before I answer that, I want to make sure that something is perfectly clear. The compiler's "usage" string is not lying when it says:
/debug[+|-] Emit debugging information
/optimize[+|-] Enable optimizations
Emitting debug information and optimizing the generated IL are orthogonal; they have no e...Full Article.
Tip# 77: Did you know. How to enable Page Level Tracing for your ASP.NET pages?
Enabling tracing at page level gives you a bunch of information that can be useful while debugging your application.Tracing helps understand which control uses more view state, start/end of PreInit, start/end of Init, start/end of Render, etc. This information appears at the bottom of the page. By default page level tracing is disabled.
Tracing can be enabled at Page Level and also at Application Level
To enable Tracing at Page Level select DOCUME...Full Article.
Tip #75: Did you know.How to maintain scrollposition after post back?
When web pages are posted back to the server, by default user is returned to the top of the page. On a large web page, you might have a requirement to scroll down the user automatically to the last position on the page.
MaintainScrollPositionOnPostBack page property can be used to achieve this in one of the following ways.
- Application level: To set the property by default for all pages in the website, open web.config and add the attribute to t...Full Article.
Tip #76: Did you know. How to hide a non-visual control in your designer?
Some times as you are building your web page, you may want to hide all the non-visual controls like Timer control so that the page looks close to how it would be rendered on your browser.
Our Designer can toggle between displaying and not displaying Non-visual controls using
Ctrl+Shift+N
Display ASP.NET Non-visual controls turned on:
Tip# 78: Did you know. How to navigate using Document Outline?
Document Outline window can be launched from the menu View -> Document Outline, or via short cut key Ctrl-Alt-T. The Document Outline window displays a nested, hierarchical tree of the elements and scripts on the page. It gives you a good overview of the page's content and its layout.
Double-clicking any element listed in the Document Outline window will highlight the corresponding markup for that element in the source view or the element display ...Full Article.
ASP.NET MVC Installer For Visual Studio 2010 Beta 1 And Roadmap
A little while ago I announced our plans for ASP.NET MVC as it relates to Visual Studio 2010. ASP.NET MVC wasn't included as part of Beta 1, which raised a few concerns by some (if not conspiracy theories!) ;). The reason for this was simple as I pointed out:
One thing you'll notice is that ASP.NET MVC is not included in Beta 1. The reason for this is that Beta 1 started locking down before MVC 1.0 shipped. AS...Full Article.
And Get Rid Of Those Pesky Programmers
Every now and then some email or website comes along promising to prove Fred Brooks wrong about this crazy idea he wrote in The Mythical Man Month (highly recommended reading!) that
Saturday, June 6, 2009
Download the New IIS SEO Toolkit Beta
Download the New IIS SEO Toolkit Beta
The Misfit Geek Podcast with Joe Stagner is Now Live!
The Misfit Geek Podcast with Joe Stagner is Now Live!
Alas, Smith and Jones
We have a feature in C# which allows you to declare a " friend assembly". If assembly Smith says that assembly Jones is its friend, then code in Jones is allowed to see "internal" types of Smith as though they were public(*). It's a pretty handy feature for building a "family" of assemblies that share common implementation details.
...Full Article.Alas, Smith and Jones
We have a feature in C# which allows you to declare a " friend assembly". If assembly Smith says that assembly Jones is its friend, then code in Jones is allowed to see "internal" types of Smith as though they were public(*). It's a pretty handy feature for building a "family" of assemblies that share common implementation details.
...Full Article.CodeDom vs T4: two approaches to Code Generation
There are many scenarios where the need to generate source code arises. The MVC helpers I introduced in my last post is one such example. Note that I am focusing on generating source code here, and not on scenarios where you may want to generate IL directly (which certainly do exist as well, but it's a difference discussion).
To pe...Full Article.
CodeDom vs T4: two approaches to Code Generation
There are many scenarios where the need to generate source code arises. The MVC helpers I introduced in my last post is one such example. Note that I am focusing on generating source code here, and not on scenarios where you may want to generate IL directly (which certainly do exist as well, but it's a difference discussion).
To pe...Full Article.
A T4 based approach to creating ASP.NET MVC strongly typed helpers
Earlier this week, I wrote a post on using a BuildProvider to create ActionLink helpers. That approach was using CodeDom to generate the code, and there was quite some user interest in it (and Phil blogged it, which helped!).
A T4 based approach to creating ASP.NET MVC strongly typed helpers
Earlier this week, I wrote a post on using a BuildProvider to create ActionLink helpers. That approach was using CodeDom to generate the code, and there was quite some user interest in it (and Phil blogged it, which helped!).
Tip #73: Did you know... about IIS Search Engine Optimization (SEO) Toolkit Beta
IIS Search Engine Optimization (SEO) Toolkit Beta - is a free toolkit that helps Web developers, hosting providers, and server administrators improve their sites' relevance in search results by recommending how to make them more search engine-friendly. The SEO Toolkit Beta is available for installation via the Microsoft Web Platform Installer 2.0 Beta.
The II...Full Article.
Tip #73: Did you know... about IIS Search Engine Optimization (SEO) Toolkit Beta
IIS Search Engine Optimization (SEO) Toolkit Beta - is a free toolkit that helps Web developers, hosting providers, and server administrators improve their sites' relevance in search results by recommending how to make them more search engine-friendly. The SEO Toolkit Beta is available for installation via the Microsoft Web Platform Installer 2.0 Beta.
The II...Full Article.
Tip #74: Did you know.How to Add and Remove AJAX Extenders in Visual Studio 2008 Designer?
Tip#62 showed you how to add an AJAX Control Toolkit to your Toolbox.
Once you have the toolkit here is how you proceed:
1. Switch to Design View of the page and drag drop ScriptManager control from the AJAX Extensions tab of toolbox to the designer.
2. Drag drop an asp button control to the designer to which you would want to add the extender.</...Full Article.
Tip #74: Did you know.How to Add and Remove AJAX Extenders in Visual Studio 2008 Designer?
Tip#62 showed you how to add an AJAX Control Toolkit to your Toolbox.
Once you have the toolkit here is how you proceed:
1. Switch to Design View of the page and drag drop ScriptManager control from the AJAX Extensions tab of toolbox to the designer.
2. Drag drop an asp button control to the designer to which you would want to add the extender.</...Full Article.
Unknown server tag ‘asp:SearchExpression’ error with QueryExtender control in Visual Studio 2010 Beta 1
One of the cool things about ASP.NET 4.0 is the Query Extender and the ability to search within DataContext without using WHERE clause, writing extensive code etc., It works on the new set of namespace i.e. "System.Web.UI.WebControls.Expressions" namespace.
I am trying to put up an extensive sample using QueryExtender in the next post, but for this post, I wanted to share an error that yo...Full Article.
Unknown server tag ‘asp:SearchExpression’ error with QueryExtender control in Visual Studio 2010 Beta 1
One of the cool things about ASP.NET 4.0 is the Query Extender and the ability to search within DataContext without using WHERE clause, writing extensive code etc., It works on the new set of namespace i.e. "System.Web.UI.WebControls.Expressions" namespace.
I am trying to put up an extensive sample using QueryExtender in the next post, but for this post, I wanted to share an error that yo...Full Article.
ASP.NET 4.0 QueryExtender, AutoCompleteExtender and UpdatePanel – mashing it up all
I am playing with the ASP.NET 4.0 QueryExtender released as a part of the Visual Studio 2010 Beta 1 recently. It provides endless opportunities for working with data without writing much code and when you combine it with a few Ajax features, gives a truly great user experience with very less effort.
To begin with you need the Visual Studio 2010 Beta 1 and .NET Framework 4.0 Beta 1. Yo...Full Article.
ASP.NET 4.0 QueryExtender, AutoCompleteExtender and UpdatePanel – mashing it up all
I am playing with the ASP.NET 4.0 QueryExtender released as a part of the Visual Studio 2010 Beta 1 recently. It provides endless opportunities for working with data without writing much code and when you combine it with a few Ajax features, gives a truly great user experience with very less effort.
To begin with you need the Visual Studio 2010 Beta 1 and .NET Framework 4.0 Beta 1. Yo...Full Article.
Wednesday, June 3, 2009
Working with XY Scatter Charts in Reporting Services 2008
Recently, I've been fielding a few questions regarding XY Scatter Charts in Reporting Services 2008 (see MSDN Forum Question). We have definitely noticed that working with XY Scatter charts is a bit difficult, and we do appreciate the feedback and will work to improve them in a future release. The remainder of this post will detail how you can successfully b...Full Article.
Working with XY Scatter Charts in Reporting Services 2008
Recently, I've been fielding a few questions regarding XY Scatter Charts in Reporting Services 2008 (see MSDN Forum Question). We have definitely noticed that working with XY Scatter charts is a bit difficult, and we do appreciate the feedback and will work to improve them in a future release. The remainder of this post will detail how you can successfully b...Full Article.
Implementing Incremental Navigation with ASP.NET
Traditionally, website navigation has been focused on minimizing the number of clicks required to open a given page. However, this goal has nothing to do with the real purpose of navigation, which is to make finding information easy, consistent, and transparent to the user. Also, as websites get bigger, traditional navigation controls such as drop-down menus or tree views become impractical. Faster Internet connections and larger screen sizes now allow developers to experiment with n...Full Article.
Implementing Incremental Navigation with ASP.NET
Traditionally, website navigation has been focused on minimizing the number of clicks required to open a given page. However, this goal has nothing to do with the real purpose of navigation, which is to make finding information easy, consistent, and transparent to the user. Also, as websites get bigger, traditional navigation controls such as drop-down menus or tree views become impractical. Faster Internet connections and larger screen sizes now allow developers to experiment with n...Full Article.
Bug Psychology
Fixing bugs is hard.
For the purposes of this posting, I'm talking about those really "crisp" bugs -- those flaws which are entirely due to a failure on the developer's part to correctly implement some mechanistic calculation or ensure some postcondition is met. I'm not talking about oops, we just found out that the product name sounds like a rude word in Urdu, or the specification wasn't quite right so we changed it or the code wasn't adequatel...Full Article.
Bug Psychology
Fixing bugs is hard.
For the purposes of this posting, I'm talking about those really "crisp" bugs -- those flaws which are entirely due to a failure on the developer's part to correctly implement some mechanistic calculation or ensure some postcondition is met. I'm not talking about oops, we just found out that the product name sounds like a rude word in Urdu, or the specification wasn't quite right so we changed it or the code wasn't adequatel...Full Article.
A BuildProvider to simplify your ASP.NET MVC Action Links
One downside of using Html.ActionLink in your views is that it is late bound. e.g. say you write something like this:
<%= Html.ActionLink("Home", "Index", "Home")%>
The second parameter is the Acti...Full Article.
A BuildProvider to simplify your ASP.NET MVC Action Links
One downside of using Html.ActionLink in your views is that it is late bound. e.g. say you write something like this:
<%= Html.ActionLink("Home", "Index", "Home")%>
The second parameter is the Acti...Full Article.
Tip #67: Did you know the list of ASP.Net MVC shortcuts?
Add Controller (Ctrl-M Ctrl-C)
Add Controller is a simple dialog box that lets you quickly add controllers to ASP.Net MVC Applications. Right-Click the 'Controllers' folder or simply press Ctrl-M Ctrl-C to invoke this dialog.
Tip #67: Did you know the list of ASP.Net MVC shortcuts?
Add Controller (Ctrl-M Ctrl-C)
Add Controller is a simple dialog box that lets you quickly add controllers to ASP.Net MVC Applications. Right-Click the 'Controllers' folder or simply press Ctrl-M Ctrl-C to invoke this dialog.
Tip #68 Did you know. How simple it is to attach an existing style sheet to your web page?
Open an existing web site in VWD. Open the page by double clicking on it in solution explorer to which you want to attach the existing style sheet in your web site.
Now, switch to Design View of the page and bring up Select Style Sheet dialog by clicking on menu: Format -> Attach Style Sheet as shown below.
Tip #68 Did you know. How simple it is to attach an existing style sheet to your web page?
Open an existing web site in VWD. Open the page by double clicking on it in solution explorer to which you want to attach the existing style sheet in your web site.
Now, switch to Design View of the page and bring up Select Style Sheet dialog by clicking on menu: Format -> Attach Style Sheet as shown below.
Tip #69: Did you know.The keyboard shortcut for View in Browser?
Ctrl +Shift+W does the trick for you.
This short cut is mentioned under File Menu -> View in Browser.
So if you are still using Select File -> Right click for context menu and then selecting View in Browser as shown below, you may want to start using Ctrl+Shift+W.
Tip #69: Did you know.The keyboard shortcut for View in Browser?
Ctrl +Shift+W does the trick for you.
This short cut is mentioned under File Menu -> View in Browser.
So if you are still using Select File -> Right click for context menu and then selecting View in Browser as shown below, you may want to start using Ctrl+Shift+W.
Tip #70: Did you know. how to install win7 RC IIS through command script?
Windows 7 RC's IIS included ftp 7.5 feature. Installing it from command line is a little bit different than the vista IIS7 command line. It is as following:
start /w pkgmgr /l:log.etw /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;IIS-HttpRedirect;IIS-ApplicationDevelopment;IIS-ASPNET;IIS-NetFxExtensibility;IIS-ASP;IIS-CGI;IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-ServerSide...Full Article.
Tip #70: Did you know. how to install win7 RC IIS through command script?
Windows 7 RC's IIS included ftp 7.5 feature. Installing it from command line is a little bit different than the vista IIS7 command line. It is as following:
start /w pkgmgr /l:log.etw /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;IIS-HttpRedirect;IIS-ApplicationDevelopment;IIS-ASPNET;IIS-NetFxExtensibility;IIS-ASP;IIS-CGI;IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-ServerSide...Full Article.
Tip #71: Did you know... there are several new configuration settings available in FastCGI Extension 1.5 Beta
Following are the new configuration settings available in FastCGI 1.5 Extension Beta:
MonitorChangesTo - This property specifies path to a file, changes to which will trigger a recycle of FastCGI executables running for this FastCGI process pool. If value of this property is blank, file change monitoring is disabled. Path to file can be absolute or relative to folder in which FastCGI process (as specified by Exe...Full Article.
Tip #71: Did you know... there are several new configuration settings available in FastCGI Extension 1.5 Beta
Following are the new configuration settings available in FastCGI 1.5 Extension Beta:
MonitorChangesTo - This property specifies path to a file, changes to which will trigger a recycle of FastCGI executables running for this FastCGI process pool. If value of this property is blank, file change monitoring is disabled. Path to file can be absolute or relative to folder in which FastCGI process (as specified by Exe...Full Article.
IIS Search Engine Optimization Toolkit
SEO (search engine optimization) is one of the important considerations that any Internet web-site needs to design with in mind. A non-trivial percentage of Internet traffic to sites is driven by search engines, and good SEO techniques can help increase site traffic even further.
Likewise, small mistakes can significantly impact the search relevance of your site...Full Article.
IIS Search Engine Optimization Toolkit
SEO (search engine optimization) is one of the important considerations that any Internet web-site needs to design with in mind. A non-trivial percentage of Internet traffic to sites is driven by search engines, and good SEO techniques can help increase site traffic even further.
Likewise, small mistakes can significantly impact the search relevance of your site...Full Article.
Tuesday, June 2, 2009
Cross domain access policy in Silverlight applications
An Alternative Approach To Strongly Typed Helpers
One of the features contained in the MVC Futures project is the ability to generate action links in a strongly typed fashion using expressions. For example:
<%= Html.ActionLink<HomeController>(c => c.Index()) %>
Microsoft Web Platform Installer
One of the cool new releases coming out this year is a small download manager - the Microsoft Web Platform Installer - that makes installing and configuring web server and web development stacks really easy. It is a free tool that you can download from the www.microsoft.com/web site (here is the direct link to the instal...Full Article.
Monday, June 1, 2009
ASP.NET MVC Validation with the Data Annotation Validators
Tip#66: Did you know... how to insert quotes values automatically while typing the attrib values?
It's a nice time saver if you would like the HTML editor to automatically add quotes for the attribute values while you are typing.
To set this option select Tools->Options. Check Show all settings. From the left pane select Text Editor -> HTML -> Format and check the insert attribute value quotes when typing checkbox.
Writing A Page To A String
ASP.NET Pages are designed to stream their output directly to a response stream. This can be a huge performance benefit for large pages as it doesn't require buffering and allocating very large strings before rendering. Allocating large strings can put them on the Large Object Heap which means they'll be sticking around for a while.
May 30th Links: ASP.NET, AJAX, ASP.NET MVC, Visual Studio
Here is the latest in my link-listing series. Also check out my ASP.NET Tips, Tricks and Tutorials page and