473,405 Members | 2,282 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,405 software developers and data experts.

Can JavaScript run a ASP.Net function?

When users come to website, I want to identify them (browser, referrer,
....).
I am doing it in global.asax, well, when they type www . sitename . com
the global.asax identify them and redirect them to another page.
in my site, there are lots of html and other stuff, how to identify them
when they
directly go to www. sitename . com / filename.html ?

I use shared host service, and so can not configure IIS to handle html
files.
in worse situations, the first file may user goes directly into is a php
file.

Can I use a JavaScript in all files and the JS runs global.asax
start_session,
or run a asp.net function?

Any idea? no way?!
Mar 7 '06 #1
4 1213
Hi,
yes, you can call Server side function by using AJAX

"Saber" <saber[.AT.]oxin.ir> wrote in message
news:OU**************@TK2MSFTNGP11.phx.gbl...
When users come to website, I want to identify them (browser, referrer,
...).
I am doing it in global.asax, well, when they type www . sitename . com
the global.asax identify them and redirect them to another page.
in my site, there are lots of html and other stuff, how to identify them
when they
directly go to www. sitename . com / filename.html ?

I use shared host service, and so can not configure IIS to handle html
files.
in worse situations, the first file may user goes directly into is a php
file.

Can I use a JavaScript in all files and the JS runs global.asax
start_session,
or run a asp.net function?

Any idea? no way?!

Mar 7 '06 #2
"Munawar Hussain" <mu*******@msn.com> wrote in message
Hi,
yes, you can call Server side function by using AJAX


even in a non-asp.net page?
Mar 7 '06 #3
Hi,

Saber wrote:
"Munawar Hussain" <mu*******@msn.com> wrote in message
Hi,
yes, you can call Server side function by using AJAX


even in a non-asp.net page?


Yes.

Basically, you may use JavaScript from any page to create a XmlHttp
object. Then you use this object to send a request to any server, and
you use a callback method (still in JavaScript) to handle the response.
The only requirement is that the environment (in your case the web
browser) is able to create a XmlHttp object. This is the case in IE 6
and in every Mozilla-based browser.

The server must understand the request. Typically, .NET uses SOAP to
communicate, but it is not a must.

There are different tutorials online, I let you google with keywords
SOAP, Web services, AJAX, XmlHttp.

HTH,
Laurent
Mar 7 '06 #4
Thanks Laurent and Munawar :)
I'll ask you question in this thread if I found a problem.

Mercy
Mar 7 '06 #5

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

Similar topics

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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.