ASP.Net Tips Archives - Page 6 of 7 - All Things DotNetAll Things DotNet
  • Subscribe to this RSS feed
  • Receive updates as soon as they are posted.

ASP.Net Tips Category

September 7 , 2010 | | In: ASP.Net, ASP.Net Tips

Accessing Server.MapPath from an ASP.Net Class

Many times, you need to use a relative path (Server.MapPath), but in classes, you can’t use it directly. You need to use the namespace in which it resides.

September 7 , 2010 | | In: ASP.Net, ASP.Net Tips

Deleting a file in ASP.Net

Every once in a while, it becomes necessary to delete a file in your code. Here is how you do that:

We’ve all seen how websites can look really terrible through the eyes of IE8. But there is hope for the short term, if your ASP.Net website suffers from this malady.  You can make an entry in your web.config, so that even if a customer is using IE8 to view your site, it will be forced […]

August 19 , 2010 | | In: ASP.Net, ASP.Net Tips

Dynamic Copyright Year

In the footer of all your pages, do you have a copyright statement, with the year? Are you tired of having to update it every year?

August 19 , 2010 | | In: ASP.Net, ASP.Net Tips

Asp.Net Root Shortcut

In your code, in order to refer to the root, all you need to do is put “~/” in the front of your path. I’ve seen many people actually use http:// in order to get to the exact page, but it’s not only not necessary, but overkill. Let’s say your file is called myFile.aspx and […]

August 16 , 2010 | | In: ASP.Net, ASP.Net Tips

2 Cool New Page Properties Added in v4.0

There are 2 new properties which have been added to the Page class in ASP.Net 4.0 : Keywords Description

August 12 , 2010 | | In: ASP.Net, ASP.Net Tips, Visual Studio

Formatting text in HTML Source View

If the code in your Source View seems unorganized and unreadable, there is a simple way, in Visual Studio, to format the text into a more readable format. What it actually does, is to create a hierarchical, tabbed view of your HTML. All you need to do is to highlight the text you need reformatted […]

REST (the initials) stand for : Representational State Transfer. REST is a service API which allows you to access services and data from various clients. To do this, you would specify a URL to some item, like a web page with xml in it, and get that item back, via an HTP ‘GET’ request, and […]

August 11 , 2010 | | In: ASP.Net, ASP.Net Tips

‘EndsWith’ is Case-Sensitive

The string function ‘EndsWith’ is case-sensitive, even in VB.Net, so if you’re looking for a certain string (maybe the file extension, in a filename), you need to make sure you’re looking for the correct thing, since ‘xls’, with case-sensitivity, is different than ‘XLS’. So, if you’re function is looking for ‘xls’, you must make sure […]

If you already have any kind of button, whether it be a plain button, LinkButton, or Imagebutton, in a TemplateField, within a GridView, you can add ‘Select’ features to it, just as if you had added a ‘Select’ column. All you need to do is add ‘Select’ to the CommandName property. Then, anything you could […]

All Things DotNet Discussed – Winforms/ASP.Net/SharePoint/WPF

If you find this site helpful,
please donate to help keep it online and free

Code 'n' Sprox   DreamTemplate - Web Templates

Follow us on Twitter

Follow AllThingsDotNet on Twitter

Test - The Name: 6936