473,473 Members | 1,807 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Javascript\Code Behind\Error on Page?

I need to call my visitor tracking script selectively from Code Behind using
the following sub, but it gives me an Error on Page. I've removed my account
and other information, but the format is the same. I don't really know
javascript, I just copied my tracking code from my HTML page. I'm just
learning ASP.NET, too, so not sure where my mistake is.

In page load, I am doing:

If Not IsPostBack then
TrackVisit()
End If

Private Sub TrackVisit()
Dim v As String = "<script type='text/javascript'>varA='00000000';var" & _
"P='DetectName';var U='DetectUrl';</script><scripttype='text/javascript'" & _
"src='http://www.3dstats.com/xxxx/yyyyy.zzz'></script><noscript>" & _
"<imgsrc='http://www.3dstats.com/xxxx/yyyy.zzz?usr=00000000'" & _
"border=0 height=0 width=0></noscript>"

RegisterStartupScript("visit", v)
End Sub

Thanks,
George

Nov 18 '05 #1
1 1231
Never mind. I found my mistake. I left some critical spaces out of my string! ;-)

"George" <------@----.---> wrote in message
news:sY*****************@bgtnsc05-news.ops.worldnet.att.net...
I need to call my visitor tracking script selectively from Code Behind using
the following sub, but it gives me an Error on Page. I've removed my account
and other information, but the format is the same. I don't really know
javascript, I just copied my tracking code from my HTML page. I'm just
learning ASP.NET, too, so not sure where my mistake is.

In page load, I am doing:

If Not IsPostBack then
TrackVisit()
End If

Private Sub TrackVisit()
Dim v As String = "<script type='text/javascript'>varA='00000000';var" & _
"P='DetectName';var U='DetectUrl';</script><scripttype='text/javascript'" & _
"src='http://www.3dstats.com/xxxx/yyyyy.zzz'></script><noscript>" & _
"<imgsrc='http://www.3dstats.com/xxxx/yyyy.zzz?usr=00000000'" & _
"border=0 height=0 width=0></noscript>"

RegisterStartupScript("visit", v)
End Sub

Thanks,
George

Nov 18 '05 #2

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

Similar topics

1
by: Michael Brennan-White | last post by:
If I submit my for using a get action the resulting page loads . If I use a post action I get an error page saying "The page cannot be found". I am calling the originating page!!! This happens...
0
by: Nathan | last post by:
Hi, I seem to having a peculiar problem with the display of odd and even pages in XSL-FO. Here is a small background of the problem. My xsl stylesheet mentions my fo:layout-master-set as ...
2
by: James | last post by:
I've been to websites where if I navigate off a form, trying to get back to it by hitting the back button gives me a page which says "Warning, page has expired". It doesn't display the page. I've...
4
by: Kevin Phifer | last post by:
Ok, before anyone freaks out, I have a solution I need to create that gathers content from maybe different places. Each one can return a <form> in the html, so its the classic can't have more than...
2
by: John Lau | last post by:
Hi, Is there documentation that talks about the page lifecycle, the lifecycle of controls on the page, and the rendering of inline code, in a single document? Thanks, John
6
by: MooreSmnith | last post by:
When I navigate to the next page using Response.Rediect("MyNextPage.aspx") current page Page_Load event is called. What I may wrongly understood is that post back will happen whenever there is any...
1
by: Lenard Gunda | last post by:
Hi! I have the following problem. From my main page, when someone clicks a button, it uses client side javascript to open another .aspx page. This page displays content, based on what the...
5
by: tshad | last post by:
Is there a way to carry data that I have already read from the datagrid from page to page? I am looking at my Datagrid that I page through and when the user says get the next page, I have to go...
7
by: UJ | last post by:
I've got a page with a user control on it. While the page is loading, it needs to check certain conditions of the user object to enable/disable things on the screen. Currently in the page_load of...
0
by: cfps.Christian | last post by:
When I did a login page I would have them submit via button and in the button click event check their credentials against the database (Active Directory if you choose) and if it validated I would...
0
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...
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...
1
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...
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
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.