Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: ASP.NET .NET ASP.NET and C# - Safe Filenames Tutorial

A handy function for generating 'safe' file and folder names from user-inputted text. This is an excellent assistant when implementing good seo practices on your site.

Tutorial Details:

ASP.NET and C# - Safe Filenames

One of the key fundamentals of SEO is using search-engine and user friendly urls instead of ?id=123&c=234&s=4398. I have a nifty function I've written which is used here to generate the filename from the Title of a page. It's worth sharing because it works well and it's been refined so that it does quite a good job.

Essentially it removes any illegal characters, replaces spaces with hyphens, strips out any instances of double -'s and then checks the beginning and end of the filename to ensure it doesn't look stupid.

Once you have your safe filename, you can remove the need for "id=1344" by
storing the filename in the database and using "WHERE filename=" instead which can be determined using Server variables.


 

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
ASP.NET .NET ASP.NET and C# - Safe Filenames Tutorial

View Tutorial:
ASP.NET .NET ASP.NET and C# - Safe Filenames Tutorial

Related Tutorials:

JavaWorld - Net News Central
JavaWorld - Net News Central
 
C# : A language alternative or just J--? (part1)
C# : A language alternative or just J--? (part1)
 
Is WSDL the indispensable API?
Is WSDL the indispensable API?
 
Rumble in the jungle: J2EE versus .Net, Part 1
Rumble in the jungle: J2EE versus .Net, Part 1
 
Let the mobile games begin, Part 2
Let the mobile games begin, Part 2
 
The J2EE 1.4 Tutorial
The J2EE 1.4 Tutorial is a guide to developing enterprise applications for the Java 2 Platform, Enterprise Edition (J2EE) version 1.4. Here we cover all the things you need to know to make the best use of this tutorial.
 
Java and .Net interoperability using CORBA
Java and .Net interoperability using CORBA A recently released product takes the pain out of implementing object-level calls between Java and .Net While the need for interoperability between Java and .Net has become a common problem in larger organ
 
Software Download Central compatible.
GNU getopt - Java port A while back I found myself in need of a Java command line option parser. Unsatisfied with free versions I was able to find on the net, I volunteered to port the GNU getopt family of functions from C to Java. The current release
 
Light-Weight Visual Components Library for different platform: SWT, J2SE, J2ME, .NET
Light-Weight Visual Components Library for different platform: SWT, J2SE, J2ME, .NET
 
Lucene in Action
Lucene in Action Lucene is a gem in the open-source world--a highly scalable, fast search engine. It delivers performance and is disarmingly easy to use. Lucene in Action is the authoritative guide to Lucene. It describes how to index your data, includin
 
Jeff Schmitt's JDBC Page
This tutorial assumes you are using the MySQL database and the GWE JDBC drivers. The host computer is triton.towson.edu.
 
JavaServer Pages Technology - Documentation
Sun's tutorial for Java Server Pages that provide a good introduction to design web pages with JSP.
 
Tag Libraries Tutorial
This tutorial describes how to use and develop JavaServer Pages tag libraries. The tutorial assumes that you know how to develop servlets and JSP pages and are familiar with packaging servlets and JSP pages into Web application archives.
 
Interoperability with Patterns and Strategies for Document-Based Web Services
In Part 2 of this article, we demonstrate interoperability for document-driven web services with Microsoft .NET (C#) using strategies discussed in Part 1.
 
Open Source Web Frameworks in Java
Open Source Web Frameworks in Java Open Source Web Frameworks in Java Struts Struts Frame work is the implementation of Model-View-Controller (MVC) design pattern for the JSP. Struts is maintained as a part of Apache Jakarta project and is open
 
10 Minutes Guide to Ant
10 Minutes Guide to Ant 10 Minutes Guide to Ant Previous Tutorial Index Next Introduction Well for the next 10 minutes get ready to devote to the ant guide. This will make some sence to the ant. Ant is a free tool under GNU Licence and is
 
Building Web Application With Ant and Deploying on Jboss 3.0
Building Web Application With Ant and Deploying on Jboss 3.0 Building Web Application With Ant and Deploying on Jboss 3.0 Previous Tutorial Index Next In this lesson I will show you how to build you web application and install on the Jboss 3.0
 
Introduction to the JDBC
Introduction to the JDBC Introduction to the JDBC Introduction T his article introduce you with JDBC and shows you how to our search engine with database. What is JDBC? J ava Database Connectivity or JDBC for short is set of Java API's that
 
What is WAP? Detailed discussion of WAP API with examples.
What is WAP? Detailed discussion of WAP API with examples. Learn WAP in 60 minutes W ireless Application Protocol or WAP for short, allows the developers to develop next generation web application for cellular devices. Through WAP enabled mobile
 
What is WAP? Wireless Application Protocol
What is WAP? Wireless Application Protocol Tutorial What is WAP? W ireless Application Protocol or WAP for short is simply a protocol - a standerized way for delivering Internet data over wireless networks. Thus WAP links Wireless Network with
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.