Connecting Tech Pros Worldwide Help | Site Map

Screenresolution written in database using only 1 page.

IkBenHet
Guest
 
Posts: n/a
#1: Jul 23 '05
Aldo it is something very simpel, it is not easy to find good
information on this subject.

For the moment we have only 1 ASP.NET page and we want that if vistors
access it, this visit is logged into a database. Because we are
developing the future site right now, we also want to know what
browser, screensize and resolutions the visitors of our site are using.

I already know that because Javascript is clientside and ASP.NET
serverside, that you can not pass it easly from Javascript to ASP.NET.
Possible solutions are redirecting from javascript to a new page and
pass the values in a query string or write a cookie. I think these are
both not that good solutions.
I was also told that it is possible with a onload function and some
hidden fields. This would be great because then you can stay on the
same page. Maybe you guys can help me on this.

I found this on the web:
http://www.devcity.net/Articles/64/1...esolution.aspx

Thank you for you support on this!

Grant Wagner
Guest
 
Posts: n/a
#2: Jul 23 '05

re: Screenresolution written in database using only 1 page.


"IkBenHet" <ikbenhet79@hotmail.com> wrote in message
news:1122031191.760481.234620@f14g2000cwb.googlegr oups.com...[color=blue]
> Aldo it is something very simpel, it is not easy to find good
> information on this subject.
>
> For the moment we have only 1 ASP.NET page and we want that if vistors
> access it, this visit is logged into a database. Because we are
> developing the future site right now, we also want to know what
> browser, screensize and resolutions the visitors of our site are
> using.
>
> I already know that because Javascript is clientside and ASP.NET
> serverside, that you can not pass it easly from Javascript to ASP.NET.
> Possible solutions are redirecting from javascript to a new page and
> pass the values in a query string or write a cookie. I think these are
> both not that good solutions.
> I was also told that it is possible with a onload function and some
> hidden fields. This would be great because then you can stay on the
> same page. Maybe you guys can help me on this.
>
> I found this on the web:
> http://www.devcity.net/Articles/64/1...esolution.aspx
>
> Thank you for you support on this![/color]

<body>
<script type="text/javascript">
(new Image()).src = 'somepage.asp' +
'?width=' + screen.width +
'&height=' + screen.height;
</script>

somepage.asp would use Request.Value() to retrieve the values of 'width'
and 'height' and store them in a database.

--
Grant Wagner <gwagner@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq


Closed Thread


Similar JavaScript / Ajax / DHTML bytes