473,787 Members | 2,934 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Beginner questions

Hi all,

I've recently started learning ASP.Net and have a few questions mostly
regarding best practice.

As postback uses JS is it normal practice to check if the browser
supports/has JS enabled to ensure the site functions correctly? I know the
vast majority of browsers probably have JS installed and enabled, but I'd
still like to know what the standard technique is for doing this.

Secondly, I've been playing about with multiview and ASP hyperlink objects.
For a small site (Around 5 pages) is the use of multiview overkill? Is it
mainly used for wizards etc? This relates to the first question too. By
using this technique (all hyperlink objects firing a postback), any browser
without JS wouldn't beable to view the site.

Regards,

Chris
Jan 27 '06 #1
2 1097
Chris,

Actually the way post backs are set up they will still work even if
javascript is disabled in a browser. That goes for buttons. Something like
an autopostback on a drop down list won't work with javascript disabled.

You'll want to be careful using a postback event to change pages. While this
won't cause problems for users who want to navigate your site it will keep
the site from being spidered by search engines correctly. If this is a
public website and you want search engines to be able to catalog its pages
you should use good old hyperlinks to trigger page changes. Most search
engines will follow different query strings tacked onto a hyperlink.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Chris" <mi*********@gm ail.com> wrote in message
news:2r******** ************@fe 2.news.blueyond er.co.uk...
Hi all,

I've recently started learning ASP.Net and have a few questions mostly
regarding best practice.

As postback uses JS is it normal practice to check if the browser
supports/has JS enabled to ensure the site functions correctly? I know the
vast majority of browsers probably have JS installed and enabled, but I'd
still like to know what the standard technique is for doing this.

Secondly, I've been playing about with multiview and ASP hyperlink
objects. For a small site (Around 5 pages) is the use of multiview
overkill? Is it mainly used for wizards etc? This relates to the first
question too. By using this technique (all hyperlink objects firing a
postback), any browser without JS wouldn't beable to view the site.

Regards,

Chris

Jan 27 '06 #2
Not all postbacks happen with JS. Only things like the dropdown list or
other non-<input> controls. If all you have is a simple submit button, then
JS can be turned off and still send postbacks. I personally have never
checked to see if a browser supports JS. My guess is that they do not since
it most likely so widely supported and used (aside from the few paranoid
people). But if you want to ensure the user is told they need JS before
they actually try to do something, then that would not be a problem.

From my experience, it is usually best to have each page their own physical
page (unless they have similar behavior and layout). If you use the
multiview, the server has to load the object model for all pages, regardless
of whether or not you view the page. This can unnecessarily use processing
cycles. It can also be harder to maintain as you cannot just target a fix
for a particular page but rather have to sift through the code that
generates all the views to get to your bug.

"Chris" <mi*********@gm ail.com> wrote in message
news:2r******** ************@fe 2.news.blueyond er.co.uk...
Hi all,

I've recently started learning ASP.Net and have a few questions mostly
regarding best practice.

As postback uses JS is it normal practice to check if the browser
supports/has JS enabled to ensure the site functions correctly? I know the
vast majority of browsers probably have JS installed and enabled, but I'd
still like to know what the standard technique is for doing this.

Secondly, I've been playing about with multiview and ASP hyperlink
objects. For a small site (Around 5 pages) is the use of multiview
overkill? Is it mainly used for wizards etc? This relates to the first
question too. By using this technique (all hyperlink objects firing a
postback), any browser without JS wouldn't beable to view the site.

Regards,

Chris

Jan 27 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
437
by: Atip Asvanund | last post by:
Dear sirs, I am trying to learn how to use Boehm's garbage collector: http://www.hpl.hp.com/personal/Hans_Boehm/gc/ on a Linux machine. I am a beginner, and I find its documentation inadequate. I have followed all instructions for installation, yet I still have the following questions. 1) The instruction said to include the header file, and link to the library file. I was wondering if I am doing it correctly in my
7
2945
by: Rensjuh | last post by:
Hello, does someone have / know a good C++ tutorial for beginnners? I would prefer Dutch, but English is also fine. Hoi, heeft / kent iemand nog een goede C++ tutorial voor beginners? Het liefste in Nederlands, maar Engels is ook goed. Thnx, Rensjuh
27
4374
by: MHoffman | last post by:
I am just learning to program, and hoping someone can help me with the following: for a simple calculator, a string is entered into a text box ... how do I prevent the user from entering a text instead of a number, or give an error message? Also, how can I make the program verify there are two valid entries in txtBox1 and txtBox2 to then ENABLE the button operators (ie +, -, /, *).
1
2563
by: Robert J. Bonn | last post by:
I'm trying to set up a contact list in MS Access 97. I've looked through a reference book and the program's help screens, but the light bulb isn't quite coming on for me. If one of you could take the time to answer two very elementary questions, I'd appreciate it. Suppose the contact list consists of (for example) musicians and teachers. For every person in the list, we keep name, address, etc. For musicians, we keep track of what...
22
18151
by: ddg_linux | last post by:
I have been reading about and doing a lot of php code examples from books but now I find myself wanting to do something practical with some of the skills that I have learned. I am a beginner php programmer and looking for a starting point in regards to practical projects to work on. What are some projects that beginner programmers usually start with? Please list a few that would be good for a beginner PHP programmer to
0
9655
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9498
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10363
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8993
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5398
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5535
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4069
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.