[karsten samaschke]

ASP.NET daily. Or weekly.

SmartNavigation and why not to use it

SmartNavigation seems to be a nice feature - it allows Internet Explorer to handle PostBacks in a very clever way. You don't have to worry about having a long site - it will return to the point where you have been before. Or if you define some events - SmartNavigation will enable you to invoke the handlers without posting the page back to the server.

But: If you are going to program a serious website for users of different browsers (Netscape, Opera, Konqueror or Safari) you need to turn SmartNavigation off, because it simply doesn't work with this kind of browsers.

Another aspect is the following behaviour reported in the newsgroups (and not verified by myself ;): If you would like to put the focus on some objects of your page (i.e. textboxes), you usually use JavaScript:

   Page.RegisterClientScriptBlock("focus", _

or (VB.NET)

   Page.RegisterClientScriptBlock("focus", _
      "<script language=""JavaScript"">" & _
         "document.<id-of-your-control>.focus();" & _
      "</script> ")

But: Try it with SmartNavigation turned on: It simpy won't work on some systems. The reasons are unknown, but it seems to be, as if IE won't interpret the script correctly.

Sad, isn't it?


bino Joseph said:

am facing problem when "Smart Navigation" turned on.My forms has got 2 and more panels inside multipage.If We browse through the same page for long time,the events are not recognised.The browser (IE 6)showing some error(probably java script error).If someone have a better idea what to do,please let me know.
Thanks in advance,
# September 29, 2003 1:28 AM

BarfieldMV said:

When i turn on smartnavigator my asp.net application seems to get stuck when i enter a detail screen and press a Cancel button to get redirected back. Kinda strange behaviour but very wrong.
# March 3, 2004 10:11 AM

falcryn said:

Hmmm... turned this on and it is a dream-come-true. Tested with Netscape 4,6, & 7 and all works fine. Probably will have an issue eventualy, till then I am lovin it.
# March 25, 2004 6:59 PM

burnt_toast said:

There are problems with smartnavigation. I have an asp.net page that does form validation and displays a javascript alert if there are errors with the submission. But the js alert gives back an error ("Invalid Pointer") if smartnavigation is turned on.
# March 26, 2004 3:52 PM

Oksana said:

can somebody tell me why SmartNavigation="true"
doesn't prevent the form from screen flickering when I work with treeView on that page? It looks agly when after each click on the node the page is redrawn.
Any idea how to prevent it?
# March 28, 2004 3:06 AM

Ajay Jain said:

smartnavigation does problem when the popup window is opened and alongwith it the parent page is refreshed. Under this situation, the parent window comes at top instead of popup window.
# April 9, 2004 7:42 AM

Guy Cangelosi said:

using SmartNavigation="true" anihilates the CSS Stylesheet after a postback.
The stylesheet being linked in header and using IE6 as a browser.
The HTML (aspx) document is loaded in a Frameset.
# April 13, 2004 11:40 AM

Adam Gartee said:

I have found that SmartNav crashes Internet Explorer (fully patched as of current) when the page includes CSS styles containing expresssions refering to page elements (DIVs in my case).
# April 30, 2004 4:39 PM

Daniel Halan said:

Seems also as SmartNav looses the CSS-Styles after first postback, if it is a <link> and added at runtime..
# May 20, 2004 5:12 AM

Velu said:

When SmartNavigation = "true" i get the page.urlreferer as always null.

SmartNavigation is a very good feature, but it behaves in a errotic manner some times.

# June 23, 2004 9:40 AM

Ned said:

Mate I don't know what kind of application you have in mind that is causing SmartNavigation to behave in an 'errotic' manner.
# June 23, 2004 5:48 PM

bud said:

So if it's acting "errotically", is it causing a lot of unwanted popups?
# June 25, 2004 2:36 PM

Laiju Skaria said:

my server.transfer is not working properly when i turned on smartnavigation
# June 29, 2004 8:29 AM

Colonel Angus said:

Does anyone know of an alternative to holding scroll position on a postback?
# June 29, 2004 10:46 AM

Jacky said:

There's also a problem with SmartNav turned on. Try typing a open single quote (The sign directly below the Esc button on most keyboards) preceding some text in a textbox., e.g. `test. Click on a button to make it post back. My textbox dissappears!!!

SmartNav is truly buggy. I hope Microsoft does something abt this.... :(
# July 8, 2004 12:21 AM

Nilotpal said:

smart navingation doesn't work when i am using layers. my asp.net page contains a layer which again contains controls... when smart navigation turned on, only the outer page is smart navigated... not the inner one...
# July 21, 2004 9:35 AM

Larry said:

I was looking for some errotic behavior so i turned on SmartNav.

It Works! I am now typing with one hand!
# July 30, 2004 10:00 PM

Srinivasa Kumsi said:

In my page, i have the set the SmartNav = true.  On any pastback event, page will disapperars. When i check the server side events using the event log, every thing is fine.

i mean, after postback event, page will not load as expected. we are using IE 6.0 version.

Please guide me.....

# June 22, 2007 6:55 AM

Kalelur Rahman said:

I found lot of problems when smart navigations set to true. i try to use javascript, but not work...

# June 27, 2007 7:41 AM

Hexis said:

I have experienced something similar.  In our case we have a page being displayed in Pocket IE on Windows CE.Net 4.2 device.  After approximately 600 refreshes the browser locks up.

Repeating the same experiment on a Windows XP machine running IE 6, the problem does not occur.

The page does explicitly set focus to a input of type text.

# July 5, 2007 3:20 PM

JB Burayag said:

I have turned on the "Smartnav" and works only after the second time I click on button. why?

# July 9, 2007 11:12 AM

Anthony Nadar said:

I have a javascript which writes menu dynamicall. When I use SmartNavigation=ture, the menu does not shows. I broke my head and also a colleague's head to get rid of the problem.

# August 31, 2007 5:36 AM

DeVries48 said:

Microsoft says: use SetFocus and MaintainScrollPositionOnPostback insead.

(Smartnavigation is obsolete)

# November 14, 2007 7:42 AM

ssudar said:

That's true. But where to use that Focus() method ?


Shahaji Udar

# October 8, 2008 4:58 AM

Bino said:

btw how can we set SmartNavigation for a page??


# December 18, 2008 7:19 AM

praveenit84 said:

im using devex controls,when smart navigation is turned on it is giving script errors

# January 20, 2011 7:19 AM

Gunter said:

Wonderful post but I was wanting to know if

you could write a litte more on this topic? I'd be very grateful if you could elaborate a little bit more. Cheers!

# September 14, 2012 10:28 PM

Francis said:

Oh kittens yes. This is the perfect reason I was born. To find you, my

long lost blogging soul-mate.

# September 26, 2012 5:07 PM

Buckner said:

Hmm it seems like your website ate my first

comment (it was extremely long) so I guess I'll just sum it up what I had written and say, I'm thoroughly enjoying your blog.

I as well am an aspiring blog writer but I'm still new to everything. Do you have any helpful hints for beginner blog writers? I'd certainly appreciate it.

# November 2, 2012 11:27 AM

Southern said:

I really like what you guys are usually up too. Such clever

work and coverage! Keep up the very good works guys I've added you guys to blogroll.

# November 20, 2012 1:13 AM

Braden said:

Does your blog have a contact page? I'm having a tough time locating it but, I'd like to shoot you an email.

I've got some recommendations for your blog you might be interested in hearing. Either way, great blog and I look forward to seeing it develop over time.

# December 9, 2012 8:35 AM

Locklear said:

Thanks , I have recently been searching for information

about this topic for ages and yours is the greatest I've found out till now. But, what in regards to the conclusion? Are you positive in regards to the source?

# January 19, 2013 6:34 AM

Hay said:

Hello! I could have sworn I've been to this website before but after checking through some of the post I realized it's new to me.

Anyways, I'm definitely glad I found it and I'll be

book-marking and checking back frequently!

# January 19, 2013 12:13 PM

Summerlin said:

Pretty section of content. I just stumbled upon your blog and

in accession capital to assert that I acquire really enjoyed account your blog posts.

Anyway I’ll be subscribing to your augment and even I achievement you access

consistently fast.

# January 26, 2013 1:43 PM

Elliott said:

Thanks so much for writing all of that the first-rate information!

Looking forward to checking out more posts!

# January 28, 2013 10:53 AM

Carnes said:

3. Holidays are when many of the presents are purchased and shared.

a mysterious personage who, in the bleak light of dawn one Christmas morning, stumbled on a

foundling - a baby camera tenderly wrapped in a little travel rug and gently place in a tiny wicker

sleigh, discretely left at her front door.

# January 29, 2013 12:50 AM

Davies said:

aluminum curtains rods have been much lighter than those steel rods that we previously used-

# January 29, 2013 11:20 AM

Stanley said:

Articles with informative content something

like yours have been a breath of fresh air. I

thoroughly enjoyed every thought you made in your material.

I am with you on your original views and unique content. Thank you.

# January 30, 2013 12:27 AM

Bloom said:

Yes it could be argued the opening ‘flash forward’ is

unnecessary and that the intriguing way that the story is

set up – each character is deliberately set aside

with on screen name captions – doesn’t actually pay off with the type of

intricate ‘character study’ it was doable,

it’s still admirable that a potentially silly premise is

treated with such square-jawed conviction.

# February 5, 2013 10:10 AM

Shuman said:

Hi there, just became aware of your blog through Google, and found that it's really informative. I'm gonna watch

out for brussels. I'll appreciate if you continue this in future. Many people will be benefited from your writing. Cheers!

# February 10, 2013 11:53 PM

Purdy said:

I visited various sites however the audio feature for

audio songs existing at this web site is actually excellent.

# February 11, 2013 9:18 PM

Beach said:

Its like you read my mind! You seem to know a lot about this, like you

wrote the book in it or something. I think that you could do with a few pics to drive the message home

a little bit, but other than that, this is wonderful blog.

An excellent read. I'll certainly be back.

# February 12, 2013 2:49 PM

Ives said:

Heya are using Wordpress for your site platform?

I'm new to the blog world but I'm trying to get started and set up my own.

Do you require any html coding knowledge to make your own blog?

Any help would be really appreciated!

# February 13, 2013 10:44 PM

Carder said:

What's up i am kavin, its my first time to commenting anywhere, when i read this piece of writing i thought i could also make comment due to this brilliant article.

# February 15, 2013 9:58 AM

Friedman said:

I love it when folks get together and share views. Great blog,

keep it up!

# February 17, 2013 2:44 AM

Herrmann said:

You ought to be a part of a contest for one of the finest websites on

the internet. I'm going to highly recommend this site!

# February 17, 2013 4:41 AM

Hughey said:

Wow, fantastic weblog structure! How lengthy have you been running a blog

for? you make blogging glance easy. The entire glance of your website is excellent, as neatly as the

content material!

# February 18, 2013 2:58 PM

Gray said:

Its like you read my mind! You seem to know so much about this,

such as you wrote the e book in it or something.

I think that you could do with some percent to power the message house a

bit, but instead of that, that is magnificent blog. A fantastic read.

I will definitely be back.

# February 18, 2013 6:38 PM

Jolly said:

Hello, i think that i saw you visited my site thus i came to “return the favor”.

I am attempting to find things to improve my website!

I suppose its ok to use some of your ideas!!

# February 19, 2013 10:28 AM

Schramm said:

I'm impressed, I have to admit. Seldom do I come across a blog that's both

educative and engaging, and without a doubt, you've hit the nail on the head. The problem is something that not enough folks are speaking intelligently about. I am very happy that I came across this during my search for something concerning this.

# February 19, 2013 2:32 PM

Boatman said:

What's up to every one, the contents present at this web site are in fact awesome for people experience, well, keep up the nice work fellows.

# February 19, 2013 8:57 PM

Quintanilla said:

Its like you learn my thoughts! You seem to grasp so much about this, like you

wrote the book in it or something. I feel that you simply can do with some % to pressure the message house a little bit, however other than that, that is great blog. A fantastic read. I'll certainly be back.

# February 19, 2013 11:09 PM

Puente said:

Every weekend i used to visit this web page, because i wish for enjoyment, since this this site conations genuinely pleasant funny information too.

# February 20, 2013 12:31 AM

Lacy said:

My spouse and I stumbled over here by a different website

and thought I might check things out. I like what I see so i am just following you.

Look forward to exploring your web page repeatedly.

# February 20, 2013 10:46 AM

Tubbs said:

Thanks to my father who stated to me on the topic of

this weblog, this website is really awesome.

# February 21, 2013 1:52 PM

Schoonover said:

First off I want to say great blog! I had a quick question that I'd like to ask if you don't mind.

I was curious to know how you center yourself and clear

your mind before writing. I've had trouble clearing my thoughts in getting my ideas out. I do enjoy writing however it just seems like the first 10 to 15 minutes tend to be lost simply just trying to figure out how to begin. Any ideas or hints? Cheers!

# February 22, 2013 5:47 PM

Poland said:

It's going to be end of mine day, but before end I am reading this fantastic paragraph to increase my experience.

# February 23, 2013 1:32 AM

Grubb said:

Fascinating blog! Is your theme custom made or did you download

it from somewhere? A theme like yours with a few simple tweeks would really make my blog jump out.

Please let me know where you got your design. Cheers

# February 23, 2013 8:01 AM

Winstead said:

Hi there, of course this piece of writing is actually pleasant and I

have learned lot of things from it regarding blogging. thanks.

# February 23, 2013 3:34 PM

Keller said:

Hey I know this is off topic but I was wondering if you knew of any widgets I could add to my blog that automatically

tweet my newest twitter updates. I've been looking for a plug-in like this for quite some time and was hoping maybe you would have some experience with something like this. Please let me know if you run into anything. I truly enjoy reading your blog and I look forward to your new updates.

# February 23, 2013 4:23 PM

Lowell said:

Nice post. I used to be checking constantly this blog and I am inspired!

Very useful info specially the remaining section :) I maintain such information a lot.

I was seeking this particular information for a long time.

Thanks and good luck.

# February 23, 2013 5:21 PM

Henning said:

First off I want to say fantastic blog! I

had a quick question which I'd like to ask if you do not mind. I was curious to know how you center yourself and clear your thoughts before writing. I've had trouble

clearing my mind in getting my ideas out. I do take pleasure

in writing however it just seems like the first 10

to 15 minutes are wasted simply just trying to figure out how to begin.

Any recommendations or tips? Thanks!

# February 24, 2013 3:08 AM

Hull said:

Very good article. I am facing many of these issues as


# February 24, 2013 9:40 AM

Grey said:

This article will assist the internet visitors for creating

new website or even a blog from start to end.

# February 24, 2013 8:39 PM

Griffin said:

Hi Dear, are you in fact visiting this site regularly, if so afterward you

will without doubt get good know-how.

# February 25, 2013 8:16 AM

Hammonds said:

Wow that was odd. I just wrote an very long comment but after I

clicked submit my comment didn't appear. Grrrr... well I'm

not writing all that over again. Regardless, just wanted to say great


# February 25, 2013 9:06 AM

Alford said:

This is a good tip especially to those new to the blogosphere.

Brief but very precise info… Thanks for sharing this one.

A must read article!

# February 25, 2013 2:18 PM