-
|
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...
|
-
|
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...
|
-
|
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...
|
-
|
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...
|
-
|
After the Beta 2 release of Visual Studio 2010, the Publish Web Dialog was modified to include two information buttons associated with the Service URL and Site/application text boxes. (See Figure 1) Figure 1 – New information (‘hint’) buttons (see circled...
|
-
|
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...
|
-
|
Let’s see this with an example. I have the following html code on my page. Now if I format the document by selecting Edit –> Format document (or Ctrl K, Ctrl D) The document becomes I want the content inside td should remain on the same line...
|
-
|
Themes are a way to define properties of pages and controls, and can be used to provide consistent look across pages. There are several different levels of applying a theme to an individual control, a page, or an application. Control Level Define a named...
|
-
|
You can enable ASP.NET tracing either at an Application level or at a page level; see Tip# 77: Did you know… How to enable Page Level Tracing for your ASP.NET pages? for more information. With the tracing enabled, you can view the trace output in a trace...
|
-
|
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 > <...
|