Can JavaScript run a ASP.Net function?

  • Thread starter Thread starter Saber
  • Start date Start date
S

Saber

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?!
 
Thanks Laurent and Munawar :)
I'll ask you question in this thread if I found a problem.

Mercy
 
Hi,
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top