473,395 Members | 1,443 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Help: Javascript for checking user

hi,
can any one tell me a javascript that can be called on mouseover event of a
html link control .
script can check from session either a user is login or not
In the case of Login it will redirect to the given url.
In the case of not Login it will prompt the user that u r not login kindly
login.

actually that link leads a user to Download Software. but this feature is
only for registerd user.

kindly help me. it will be best if u give me a script for it.
Thanks
Noor
Dec 23 '05 #1
1 1406
First of all JavaScript is not the correct way of implementing
authentication in ASP.NET applications. So you should consider something
which does not depend on the client browser to have JavaScript enabled so
that your authentication scripts can run properly. What happens to your
client-side authentication logic when someone has just disabled JavaScript
in his/her browser?

If you are using forms authentication (which will likely be the case), then
after successful login u need to store some kind of user identity in
SessionState so that you can tell whether the current request is
authenticated or not. Once you have that piece of identity stored in
SessionState its a matter of just one IF test against that identity to
ensure that your download page is only accessible to authenticated users.
Its a very basic and very common task in web-based applications. Try using
the FormsAuthenticationModule (ideally with SSL enabled) for this purpose.
This will make your application's authentication more robust. By using
FormsAuthenticationModule you don't need to manually check for whether the
request is authenticated or not. The module can be configured to
automatically enforce request authentication and resource protection without
writing a single line of code except checking against some kind of
credential store (Active Director, DBMS, etc). Try searching MSDN for "Forms
Authentication". You will certainly find some very nice articles written (by
example) for demonstrating FormsAuthentication in action.

Good Luck

"noor" <no*****@sctbpo.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
hi,
can any one tell me a javascript that can be called on mouseover event of
a
html link control .
script can check from session either a user is login or not
In the case of Login it will redirect to the given url.
In the case of not Login it will prompt the user that u r not login kindly
login.

actually that link leads a user to Download Software. but this feature is
only for registerd user.

kindly help me. it will be best if u give me a script for it.
Thanks
Noor

Dec 24 '05 #2

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

Similar topics

53
by: Cardman | last post by:
Greetings, I am trying to solve a problem that has been inflicting my self created Order Forms for a long time, where the problem is that as I cannot reproduce this error myself, then it is...
6
by: Marios Koumides | last post by:
I have a page written in ASP and I added some Javascript code to ensure the input boxes are filled with correct data. That check is performed every time the user moves out from a textbox. Now right...
4
by: Rick | last post by:
Hello, I'm having trouble with submitting my form when checking to see if data is present in the user-inputted fields. What I want to happen is for the user to input various pieces of data,...
7
by: Jack Addington | last post by:
I've got a fairly simple application implementation that over time is going to get a lot bigger. I'm really trying to implement it in a way that will facilitate the growth. I am first writing a...
5
by: Dennis Fazekas | last post by:
Greetings, I am creating a web form which will all the user to add an unlimited number of email addresses. Basically I have 3 buttons, "Add Another Email", "-" to remove, and a "Save" button....
3
by: sunbeam | last post by:
Short Description of the Project: we developed a e-learning system for our students. each student has a unique username/password to view the modules he/she should view and nothing more. since we...
0
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted...
2
by: Dave Ekhaus | last post by:
hi i'm new to javascript. i'm hoping to get some help and find out if what i want to do is possible and - assuming it is, get some tips on how to accomplish the task. ok - assume i have a...
1
by: pmarkov | last post by:
Hello, I need to build into my php application some javascript elements. My application check a given webpage for some information - lets suppose we have to check if there is a 'special link' on a...
53
by: souporpower | last post by:
Hello All I am trying to activate a link using Jquery. Here is my code; <html> <head> <script type="text/javascript" src="../../resources/js/ jquery-1.2.6.js"</script> <script...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.