Top ASP.NET Items

Sponsors

Archives

Browse by Tags

All Tags » Tips and Tricks (RSS)
Getting a MIME type from a file extension in ASP.NET 4.5
If you've ever implemented a file upload or download scenario in ASP.NET, you've likely come across the situation of having to provide a MIME type based off of a file extension. IIS does this automatically when it serves files, but it seems like in ASP.NET there isn't a good way to provide this functionality. Searches on the web might point you to building your own Dictionary of MIME types or just writing a switch statement, but this felt like a hack to me and so I turned to a resident expert, Levi Broderick. It turns out in ASP.NET 4.5 we shipped a little-known new type, System.Web.MimeMapping, which has an API called GetMimeMapping(string fileName). Here is the MSDN documentation . You can pass either a file name as the method...
Spell Checker extension for Visual Studio 2012 HTML, ASP.NET, CSS and other files
I have updated spell checker extension for Visual Studio 2012. You can download it from Visual Studio Gallery . Spell checker supports text verification in: HTML and ASP.NET element content and attributes HTML style comments <-- HTML --> ASP.NET server side comments: <%-- ASP.NET --%> JScript, C# and C++ comments: // C++ style comments CSS and C style comments: /* C style comments */ VB and VBScript style comments: 'This is VB comment Spell checking is supported in style and script blocks as well as in JS, CS, VB, CSS, CPP and H files. Spell checker is able to detects lang attribute specified on HTML elements, extract ISO language and use it to specify appropriate dictionary for the Office spell checking engine. Requirements...
Search and Navigation Tips/Tricks with Visual Studio
This is the twenty-seventh in a series of blog posts I’m doing on the VS 2010 and .NET 4 release. Today’s blog post continues on from the Debugging Tips post I did last week, and covers some useful searching and navigation tips/tricks you can take advantage of within Visual Studio.  These tips were ones that my friend Scott Cate (who has blogged dozens of great VS tips and tricks here ) recently recommended to me as good tips that most developers using Visual Studio don’t seem to know about (even though most have been in the product for awhile).  Hopefully this post will help you discover them if you aren’t already taking advantage of them.  They are all easy to learn, and can help save you a bunch of time. Ctrl + i - Incremental...
Debugging Tips with Visual Studio 2010
This is the twenty-sixth in a series of blog posts I’m doing on the VS 2010 and .NET 4 release. Today’s blog post covers some useful debugging tips that you can use with Visual Studio.  My friend Scott Cate (who has blogged dozens of great VS tips and tricks here ) recently highlighted these to me as good tips that most developers using Visual Studio don’t seem to know about (even though most have been in the product for awhile).  Hopefully this post will help you discover them if you aren’t already taking advantage of them.  They are all easy to learn, and can help save you a bunch of time. Run to Cursor (Ctrl + F10) Often I see people debugging applications by hitting a breakpoint early in their application, and then repeatedly...
Tip/Trick: Fix Common SEO Problems Using the URL Rewrite Extension
Search engine optimization (SEO) is important for any publically facing web-site.  A large % of traffic to sites now comes directly from search engines, and improving your site’s search relevancy will lead to more users visiting your site from search engine queries.  This can directly or indirectly increase the money you make through your site. This blog post covers how you can use the free Microsoft URL Rewrite Extension to fix a bunch of common SEO problems that your site might have.  It takes less than 15 minutes (and no code changes) to apply 4 simple URL Rewrite rules to your site, and in doing so cause search engines to drive more visitors and traffic to your site.  The techniques below work equally well with both ASP...
Working with SVG files in Visual Studio and Visual Web Developer
Scalable Vector Graphics (SVG) is W3C standard language for describing two-dimensional vector and mixed vector/raster graphics in XML. Firefox 3+, Opera 9+ and Safari 3+ support SVG rendering. Unfortunately, Internet Explorer 8 does not support SVG natively and requires a plug-in. There a plug in from Adobe (although support was discontinued this year) as well as few pulg-ins listed in Wikipedia article on SVG . SVG element is part of upcoming HTML 5 standard which allows inline SVG in HTML documents. Inline SVG is not yet fully supported in modern browsers so you probably still want to use <object> element for now. For example: < html > < head > < title > SVG test </ title > </ head > < body > <...
Tip/Trick: Increase your VS screen real estate by disabling HTML Navigation Bar
Below is a tip/trick I twittered via my Twitter account earlier today.  A number of people seemed interested in – so I thought i'd blog it here too. HTML Navigation Bar in VS 2008 By default, when you are in HTML source-editing mode with VS 2008 and Visual Web Developer 2008 Express edition there is a set of drop-downs that are rendered immediately above the HTML text editor view: This set of drop-downs is called the "Navigation Bar", and in the VS 2008 HTML editor they allow you to navigate between functions and methods defined within the HTML.  These include both JavaScript client-side functions defined inline within the .aspx/.html file, and server-side methods defined in-line within the .aspx file when in single-file...
Check out the following on our Tips and Tricks Blog
Tip#66: Did you know... how to insert quotes values automatically while typing the attrib values? Tip #67: Did you know the list of ASP.Net MVC shortcuts? Tip #68 Did you know… How simple it is to attach an existing style sheet to your web page? Tip #69: Did you know…The keyboard shortcut for View in Browser? Tip #70: Did you know… how to install win7 RC IIS through command script? Tip #71: Did you know... there are several new configuration settings available in FastCGI Extension 1.5 Beta Tip #72: Did you know... you can now manage Windows Server 2008 and Windows Server 2008 R2 from Windows 7 Tip #73: Did you know... about IIS Search Engine Optimization (SEO) Toolkit Beta Tip #74: Did you know…How to Add and Remove AJAX Extenders in Visual...
New series of video tutorials on Visual Web Developer Express 2008
We have started a new series of video tutorials on Visual Web Developer Express 2008. Over the course of next few weeks we will be adding many more videos to this series . These video tutorials will range in complexity from beginner to intermediate and will help Web developers build everything from simple Web applications to full featured Web solutions that incorporate Silverlight as well as third-party libraries like jQuery. To view these video tutorials and other helpful content like recent and must read blog posts visit the Visual Web Developer Express section http://www.asp.net/vwd/ . Read More...
Silverlight Tips of the Day – Week 11
Most Recent Posts: Tip #93 - Reading XML with Silverlight Tip #92 - How to Load Images from a Stream Tip #91 - How to Apply Themes from the Silverlight Toolkit Tip #90 - How to Edit your CSPROJ File from VS Tip #89 - How to use String Resources Tip #88 - How to handle image AG_E_NETWORK_ERROR errors Tip #87 - How to Change the Startup Class Tip #86 - How to Load External Images Tip #85 - How to Save $$ on the Silverlight MIX Conference Tip #84 - How to Dynamically Load a Control from a DLL Tip #83 - Go to Mix09 Tip #82 - How to Implement Double Click Tip #81 - How to Scale your Silverlight Control Tip #80 - How to Crop an Object Tip #79 - How to Disable HTML DOM Access from your Silverlight Application. Thank you, Mike Snow SDET Lead  Visual...
More Posts Next page »