ASP.NET Today: Frames and Grids

Published 01 July 05 10:16 AM | despos

Another relatively common scenario for Web apps. You display a list of items to the user, the user can click to perform any action on the displayed items but also might want to request more information. To exemplify, imagine a shopping application with a grid of products and a Add to Cart button. Next, you need your users to get a preview of the product and more information that for space constraints couldn't show up in the grid row. How would you do that?

  • Option #1: You add a link somewhere (say, More on this item) and open a popup window. If you hate popups, you can simply redirect the user to another new page. It works, but you risk to flood the user with too many (and perhaps undesired) browser windows.
  • Option #2: You add a hyperlink column and an IFRAME tag into the page. You direct the output of the linked page to the target represented by the IFRAME.

To me, the latter option has a few advantages. First, you use distinct pages for the grid and information. Second, users see what they need without refreshing the whole page or opening a brand new one putting at risk the already limited screen real estate.

Using IFRAMEs (inline frames) is a debatable choice; but all considered if you like the result you actually get it's probably a good compromise between usability and portability. Read more here. I try to use IFRAME whenever possible. Some sparse considerations:

  • IFRAME is no longer an IE-only feature and is part of the HTML 4.0 standard
  • FireFox supports IFRAME just fine. I didn't try with Netscape 7.x, but someone told me it supports it too.
  • If you incorporate IFRAME in your Web page, pay attention to close it explicitly with </iframe>. For some reasons, it cuts the remainder of the page if you don't close the tag or use the shortcut.
  • Sure, IFRAMEs have a number of additional problems (i.e., printing, unreachable URL, dimensions) you need to deal with. Latest browsers seem to be able to stem the growth of security risks.

I also like the _search target, that is the IE and FireFox ability to open a page in the search panel, a window docked on the left edge of the browser's window. Functionally speaking, it's a good way to avoid IFRAMEs while serving users with new pages in the same screen.

NB: If you google for "_search target" you easily run into articles that report security bugs connected to the feature, especially for Mozilla FireFox. One that I've found dates back to mid April 2005. As I understand it, those security bugs relate to the browser rather than to using _search panes from within an ASP.NET page. Security risks are related to the fact that some malicious script can exploit the _search pane to follow links. Displaying a page that puts a read-only, nonclickable piece of HTML in the pane doesn't seem to be a security hazard to me. However, having users to apply the latest patch of their browser of choice is anyway a good thing.

Comments

# Me said on July 2, 2005 12:11 PM:

Web != Desktop. Let the user browse naturally and cut the web forms shit when inappropriate.

It is called Firefox, not FireFox.

# Zimbop said on July 14, 2005 11:39 AM:

Thank you for that insightful comment. Never again will I be confused as to the significant difference between Firefox, and FireFox. Like night and day!!!


jackass.

# http://www.qiangzhe.cn said on July 14, 2005 12:42 PM:

贵站做的不错。打扰了,申请个连接!
[url=http://www.qiangzhe.cn]网络营销[/url]
[url=http://www.qiangzhe.cn/liuyan/]分类目录[/url]
[url=http://www.qiangzhe.cn/Html/wangluoyingxiao/]网络营销[/url]
[url=http://www.qiangzhe.cn/Html/wangluoyingxiaozhishi/]网络营销知识[/url]
[url=http://www.qiangzhe.cn/Html/wangluoyingxiaojiqiao/]网络营销技巧[/url]
[url=http://www.qiangzhe.cn/Html/wangluoyingxiaolunwen/]网络营销论文[/url]
[url=http://www.qiangzhe.cn/Html/wangluoyingxiaozhanlue/]网络营销战略[/url]
[url=http://www.qiangzhe.cn/Html/wangluoyingxiaoqianyan/]网络营销前沿[/url]
[url=http://www.qiangzhe.cn/Html/wangluoyingxiaocehua/]网络营销策划[/url]
[url=http://www.qiangzhe.cn/Html/wangluoyingxiaoanli/]网络营销案例[/url]
[url=http://wangluoyingxiao.blogbus.com/]网络营销[/url]
[url=http://wangluoyingxiao007.blogdriver.com/]网络营销[/url]
[url=http://wangluoyingxiao.yculblog.com/]网络营销[/url]
[url=http://wangluoyingxiao1.blogbus.com/]网络营销[/url]
[url=http://hainan35.blogchina.com/]网络营销[/url]
[url=http://wangluoyingxiao.blogdriver.com/]网络营销[/url]
[url=http://www.0898it.net/]海南旅游[/url]

# Urgent said on July 27, 2005 06:06 AM:

thx but this info isnt helping me. I need to do frames in asp.net. But when I include my pages in the html page, it only calls up one aspx page instead of two which I stated. Can you help me?

# Kostantinos said on November 13, 2007 12:07 PM:

Sorry :(

<a href=" ferrari-f430gt.cadillacsls.cn "> ferrari f430gt </a>

ferrari-f430gt.cadillacsls.cn ferrari f430gt

# Rhigas said on November 13, 2007 03:42 PM:

Cool.

<a href=" ford-universidad.cadillactechnology.cn "> ford universidad </a>

ford-universidad.cadillactechnology.cn ford universidad

# Polyvios said on November 13, 2007 04:01 PM:

Nice...

<a href=" snowbum-bmw.cardishen.cn "> snowbum bmw </a>

snowbum-bmw.cardishen.cn snowbum bmw

# Solon said on November 13, 2007 05:26 PM:

Interesting...

<a href=" dearborn-toyota.butlertoyota.cn "> dearborn toyota </a>

dearborn-toyota.butlertoyota.cn dearborn toyota

# Grigorios said on November 13, 2007 08:28 PM:

Cool...

<a href=" mazda-uae.burlingtonsubaru.cn "> mazda uae </a>

mazda-uae.burlingtonsubaru.cn mazda uae

# Neophytos said on November 14, 2007 01:22 AM:

Cool.

<a href=" used-dodge.caralternator.cn "> used dodge </a>

used-dodge.caralternator.cn used dodge

# Doxiadis said on November 14, 2007 01:39 AM:

Interesting...

<a href=" volvo-connecticut.carentertainment.cn "> volvo connecticut </a>

volvo-connecticut.carentertainment.cn volvo connecticut

# Dmitris said on November 14, 2007 01:44 AM:

Nice

<a href=" schaumburg-bmw.carentertainment.cn "> schaumburg bmw </a>

schaumburg-bmw.carentertainment.cn schaumburg bmw

# ME2 said on June 18, 2008 01:02 PM:

I am pushing for renaming FireFox to Firefox; it sounds way better to me.

Leave a Comment

(required) 
(required) 
(optional)
(required)