Tag Archives: asp.net

The most easiest method to implement a SEO-friendly URL for ASP.NET application

Well, as a ASP.NET developer. You and me know that it’s a bit hard to apply what we called SEO-friendly URL for ASP.NET applications.

What is SEO-friendly URL?

It’s a URL that search engine love and will result in a better ranking for your web pages/site.

Let’s say you have an accounting system software and your product URL is http://www.xxx.com/product.aspx?Id=432 //Search engine will never know what the product is all about. They just saw Id=432 which doesn’t make sense for them. Actually, it also doesn’t make sense for human as well.

The SEO-friendly URL is a ‘wrapped’ URL to let people/robot read and know what this URL is all about. Let’s say about the above Product which have a new URL as http://www.xxx.com/product/AccountingSoftware

Search engine will know that this URL is all about Accounting software, then they will forward some traffic to your site with the “Accounting software” keyword.

 

In the PHP/Apache platform, the developer will usually use URL rewrite module easily. Almost every web hosting support this.

Unlike ASP.NET/IIS which is less flexible for configuration. You have to enable some URL rewrite ISAPI libraries which almost every web hosting don’t allow you to do that.

The good news is after ASP.NET MVC was released, it has a built-in routing feature which let you implement a SEO-friendly URL easily without messing up with IIS ISAPI.

You can provide many samples on Google, or even on Microsoft ASP.NET MVC website as well. See –> ASP.NET MVC –> Learn –> Routing and you will see how it’s easy to implement. :)

I’ll not provide a sample code here as I just want to mention that now you can easily implement SEO-friendly URL with ASP.NET.

Just try and leave me some messages if you got a problem implement it.

See ya babe!

In research of a javascript library to be used with ASP.NET on my next project…

Hi fellow readers,

Today I come to share with you how I choose a javascript library to be used on my new project.

I’m not talk about choosing just an AJAX library but I want some ‘full’ set of library which including both AJAX core and user interface core.

Here are my choices before consideration…

  • jQuery
  • YUI (Yahoo User Interface)
  • ExtJs

Sorry that I didn’t included other libraries because I’m not impressed with any other at all.

First, jQuery, this is by far the best AJAX + effect library for me personally. I really love it because it produces a ‘short’ script. Especially when compared to YUI.

However, what jQuery lack of is UI components. You have to find out 3rd party for yourself.

So, I decide to move on YUI which currently have a bunch of UI components included.

What I can say about YUI is I really impressed with it. It has a BUNCH of UI included in the library which you can select to use or bypass.

However, most of the script produced by YUI is so ‘long’ when compared to jQuery.

So, now, I hold on both YUI and jQuery and finding for a better library in the market.

I finally found ExtJs.

Try yourself and let me know how you feel about it.

I feel the ‘MOST’ impress with ExtJs.

Cool UI and effect and I decided to use it in combination with jQuery.

This will help me reduce much time to develop my project.

Technical details will be continued in the next part while I’m developing my project. :D

Talk soon,

Seree W.

Why you need validation in your web application?

Hi folks,

Did you ever use ASP.NET validation controls?

If you never heard or never use it before, see on the toolbox at the “validation” group.

Those are all validation controls.

- RequiredFieldValidator

- RangeValidator

- CompareValidator

- RegularExpressionValidator

- CustomValidator

- ValidationSummary

The main point of this control group is to be used to validate the input form entered by user before doing any postback.

But why?

As we can implement validation easily in code-behind.

Right?

It had to say Yes and No.

Yes, because validation coding in server-side (code-behind) is easier to code.

No, because while you know at the client that the data is invalid. Why you will let user postback to server?

Waste of bandwidth.

Totally waste!

This is the main reason why you have to use validation controls in your web forms.

Because it’ll help to reduce the unnecessary roundtrip between client and web server.

This will not affect much on the application that consumes less resource.

But it will be a big pain on the application that consumes much resource.

So, when you are dealing with input form.

Always use validation controls!

I know it will help you much.

:-)

How do you do when dealing with cross-browser web development?

Hi friends,

I just want to know that how do you do when you’re dealing with cross-browser web development.

Which tools you are using?

How do you handle those all buggies browser?

What experiences you faced?

As I’m dealing with cross-browser web development project where I generally strict with XHTML 1.0 standard. (As I’m using Microsoft Visual Studio 2005 and there is built-in XHTML 1.0 validator. Also, it has a built-in CSS validator too.)

I generally focus to most popular browsers including Internet Explorer 6.x, 7.x and Mozilla Firefox 2.x.

Below is my experiences and how I handle the project after I failed one. Yes, I failed one! Don’t get wrong like me! It waste your valuable time.

Continue reading

7 Tips made rendering HTML faster (Do it lately!)

Any serious web developers should experience a too long rendering time for his/her web pages. Here is the list that I usually do it before release my web application to production stage. I call it my “Optimization check-list”. Please note that, some of tip should be used on ASP.NET specifically and any other may not.

Please keep in mind that, these tips can be effectively used after you’ve completed develop your web application too. As it doesn’t required much effort to re-design or re-programming. I’ll release another tips series that can be done before development begin too as It’s very effective than these tips.

Let’s roll out your hand now. Continue reading

Prevent your .NET application from SQL Injection

Hello everyone,

Now I’ll talking about a technique that script kiddies widely used to attack to the first wall of your application. If you’re a rookie for security topics on development then you may never heard about this before. In my .NET courses training experiences, most of my trainees never know about this issue before and they feel very surprises when I’ve hacked into their system in no time.

What is SQL injection?

Straightly, It’s something like you try to inject some unexpected characters into SQL querying process to gain the out-of-case result.

Let’s see it in more detail!

What should you do If you want to coding your application to authenticate user’s credential that kept in database?

So easy, right? I’m just querying the result from database with this simple SQL query and a few line of code.

Dim strSQL As String = “Select COUNT(*) From Members WHERE LoginName=’” & txtLoginName.Text & “‘ AND Password=’” & txtPassword.Text & “‘”

Dim cmd As New SqlCommand(strSQL, con)

cmd.ExecuteScalar()

It works perfectly! but how the it’ll handle if a hard core user input something unexpected into login name just like the following

xyz’ OR ’1′=’1

When it concatenate into SQL string. It’ll result in to… Continue reading

Real world ASP.NET authentication

Hello everyone,

I’m here to say that most of ASP.NET books on the market didn’t provide you the effective way to use authentication cookies.

Assume that when you’re working with form-based authentication. (Setting in web.config) When we do some manual authentication method, we imports System.Web.Security and using FormsAuthentication.RedirectFromLoginPage(“userName”, false). The ASP.NET authentication engine will automatically create a cookie to persist authenticate status. This cookies was used to identify the user have been signed in or not. So, when we want to store some of user’s profile. How do we do it?

We can coding to create new cookie object to store those profile but we already known that ASP.NET authentication engine already created the cookie when signed in. The question should be “How do we access this cookie? Is it possible?”.

Certainly, you can do it. Please review the following code.

In your login button’s click event.

if(AuthSucceeded){ Continue reading

Create RSS Feed from your data with .NET

Hello,

Today I’ll give you a quick guide on how to create RSS Feed channel from your existing data. Before we go to the implementation, let’s see a brief overview of What is RSS, Feed or Atom?

RSS, Feed or Atom is a format name of the method for latest generation webmaster to feed their own updated contents into external web sites or any external applications. I focus to the word updated contents because this is a point of the method. (Now I’ll call it RSS and no more Feed or Atom) The content that provide RSS Feed channel almost often updated.

RSS content can be read by any RSS reader software such as Internet Explorer 7.0, Mozilla FireFox, Microsoft Outlook or any third party. Sometime it called “Feed reader” or “Aggregator” instead of “RSS reader”. Most of RSS reader can monitoring the RSS Feed channel and seeing if there are any changes occurred in the content when compared to previous time. This is very useful when some user don’t want to spend too much time to load any UI as it takes so much time than actual contents. If you still don’t get an idea and you have some RSS reader installed, you can try it online here. (Sorry, but the content of the feed is in Thai language. Just prove to get you idea)

For webmaster or developer like us, If you want to build your web site to stay tuned with Web 2.0 trend. You should build RSS Feed channel to your web application to let external applications consume your data and get more traffics.

In technically terms. RSS, Feed or Atom are all just an XML file that had their own format which RSS reader can be read. You can see the sample of XML structure here. (Just RSS 2.0)

So, how can we coding to build up RSS Feed channel from the existing data? It’s very easy, easier than you thinks! Continue reading

Great 3rd party Ajax control suite

Have you ever tried Ajaxify your ASP.NET application? Have you tried and tired?

I’m one of those guys who already tried and tired on ajaxify the application to fully working in Ajax basis. Until the day I found one of a great Ajax control suite named Telerik RadControls for ASP.NET. It was combined by various ASP.NET UI controls. Most of the controls, I can say nearly 100% already ajaxified for your instant using without deep knowledge on Javascript writing.

I found that my productivity was much increased by this suite and their support are great as I never seen this support anywhere even the more famous controls suite like Infragistics NetAdvantage, ComponentArt, ComponentOne or any other else. You can get quick response back within 24 hours with many samples on your desired case. So, for me It doesn’t a hard decision to afford it for 1 year subscription. After I’ve purchased, I found the bonus are very impressive as Telerik give us many interesting things than I thought. In my case, I purchase Telerik RadControls for ASP.NET with subscription for 1 year. I got Telerik RadControls for WinForms too. After purchase date around three months, Telerik releases new version of Telerik RadControls for WinForms with WPF. (Windows Presentation Foundation) and they give me too! What’s a kindly guy! In next six months, I found that the product was continuously updated around 4 times with many new features. Again, when they release their Telerik Reporting product. I also got it from current subscription and I thinks this reporting product are compact, fast and very easy on deployment. (I kicked out Crystal Reports, Microsoft Reporting Services and even DevExpress’ one – Every products I listed here are required to install some special executables into web server but Telerik’s just use XCOPY method)

If you are finding for a great Ajax controls suite. I can say that you will got the point when working with Telerik’s suite. Very very impressive!