开发者

How to make an SEO friendly DropDownList in ASP.NET WebForms?

I need to render a few DropDownLists on my page, allowing the user to select different Categories & Locations so as to return different result sets based on their selection.

However, I want each of the resulting selections to be crawlable. I know I could just render every possible Category, Location etc as standard HTML links on the page, which perform a GET request to the specified URL, but if possible I'd like to contain all these options within a DropDownList to keep things less cluttered.

If I were using MVC I would consider wrapping that small section of the page in a GET form, w开发者_如何学编程ith each ListItem value being the destination URL (though I wonder if even this approach would be properly crawlable?).

I am using Web Forms though and am just having trouble trying to come up with a solution.


Some ideas to consider...render unordered lists of links, and then use a CSS / jQuery / JavaScript approach to style them as menus, using approaches such as http://javascript-array.com/scripts/jquery_simple_drop_down_menu/? That will ensure that they are still crawlable links, and will be presented to users in a drop down list style fashion.

Or another idea, possibly more lightweight would be to just use jQuery to dynamically render drop down list from your unordered lists. Then when a user selected a drop down list item, you would direct the user to their selected link on the client side.


No law says you need that old <form runat="server" /> at all.

Could also use some creative CSS to put the GET enabled form outside the content HTML-flow-wise but pull it to where you want for the users.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜