 |
|
 |
So, so easy to implement -- I added it to my DNN 5.x site in 5 minutes. Awesome!!!!!
|
|
|
|
 |
|
 |
This works like a charm - it is very easy to use; make sure that asp.net has write-access to the aspx page's directory or it won't load. Thank you, Mr. JediBaron!
|
|
|
|
 |
|
 |
It works fine when I put it in individual pages of the project. But if I put this in master page, it won't display.
|
|
|
|
 |
|
 |
Its working perfect but I have problem with .aspx pages that are not in the root folder of web site. For Default.aspx it`s counting but if i add counter to page that is in subfolder it wont load picture for counter and it is not working. How to solve this problem? Thanks
|
|
|
|
 |
|
 |
Following the instructions, I got the hit counter working first time, and very good it looks too. But I have a problem. The hit counter is displayed in a footer on the MasterPage. When the Home page is displayed, the hit counter is showing the number OK, but whenever I display one of the other pages, it shows a white box and in it, the Alt text and a black square with a red x in it for the number graphic. Go back to the Home page and the number is displayed OK again. All the other pages, including Home, are displayed using a ContentPlaceHolder on the MasterPage.
Why does it not display every time, regardless of what page it is?
xiecsuk
|
|
|
|
 |
|
 |
Very nice solution! It didn't work as is with VWD 2008 express edition but with some changes it worked fine.
Modify this
Dim i As System.Drawing.Image = System.Drawing.Image.FromFile(Server.MapPath(Request("src")))
Like this... Fixed file name pdy.gif
Dim i As System.Drawing.Image = System.Drawing.Image.FromFile(Server.MapPath("pdy.gif"))
Modify this
Dim digits As Integer = CInt(Request("digits"))
Like the following. Number of digits to display = 5 (or more or less)
Dim digits As Integer = CInt("5")
Put this in any page where you want to show
<img alt="Number of visitors:" src="counter/counter.aspx?id=MainPage" />
MainPage is the name of the file where the number of visitors are stored. You may name it as you wish.
Thanks JediBaron.
Best Regards
Ferdi
|
|
|
|
 |
|
 |
Ok the Counter Image is not showing up when I go to the web page from other machines or even the machine that has the only shows up correctly when running through the IDE?? Really like the Hit Counter and want to get working fully!!
Thanks
Randy
Randy
|
|
|
|
 |
|
 |
I figured it out!!!!!! After tons of Googling. Here is how I got it to work.
You need to clear the response before sending the image. Then you need to end the response afterwards. So the code looks like this:
Response.Clear()
Response.ContentType = "image/jpeg"
imgOutput.Save(Response.OutputStream, ImageFormat.Jpeg)
Response.End()
Hope this helps you out. I wasted half-a-day on this...
|
|
|
|
 |
|
 |
you have To grant ASP.NET access to the "counter" file,
right-click the file in Explorer,
choose "Properties" and select the Security tab.
Click "Add" to add the appropriate user or group.
Highlight the ASP.NET account,
and check the boxes for the desired access.
|
|
|
|
 |
|
 |
Hi,
1) with this I cannot show the image to the remote host server,but only to my machine...
2) It asks me to connect to my site with username and passsword(a bit weird!!!)
How can I correct the above problems?Thanks...
kimi
|
|
|
|
 |
|
 |
I worked with article but i can't display image, please help
|
|
|
|
 |
|
 |
Does anyone know how to make this program work in Dreamweaver MX? I thought you could just insert some ASP.net code into it and it would work. but it doesn't. I placed the files in a folder in my root web folder and placed the code on my page and when I view the page nothing comes up. Just a broken picture link. If i right click on it in IE and say show picture, nothing happens, and when i do it in firefox it brings up the counter.aspx file. What's going on?
-Jacob
|
|
|
|
 |
|
 |
This is exactley what I am looking for my site, but the server is on, external from my local machine, only supports PHP and MySQL code, aprt from HTM and CSS etc.
Does anyone know where I can get a hit counter like this in PHP or HTML? Been looking around and can't see anything!
Dazed and confused in social situations!
|
|
|
|
 |
|
 |
I cant figure out why it cant see this file, which is located in the same directory as counter.aspx
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.FileNotFoundException: F:\root\www\sitename
Source Error:
Line 52: dim i as System.Drawing.Image = System.Drawing.Image.FromFile(server.mappath(request("pdy.gif")))
Chris
|
|
|
|
 |
|
 |
I can get your program to work fine when it is in a separate folder, but when I insert the line
into an existing aspx file, I cannot get the icon to appear. I just cant figure this out and could use some help. Thanks.
|
|
|
|
 |
|
 |
Every once in a while, the file gets emptied and remains locked. I just added some error checking blocks around file operation to fix. Otherwise it works just fine.
|
|
|
|
 |
|
 |
This is what I've been looking for
I've just started playing with this and have noticed that it is pointing at C: inetpub/wwwroot... I am trying to run it on a secure server that is seperate from my local machine. Would hard coding the "server.mappath" solve my problem?
if (experience+ability > pay)
{
document.write("Ask for more money")
}
|
|
|
|
 |
|
 |
Just thought I would let ya'll know that after a little debugging I was able to get it working.
Thanks, this is exactly what I was looking for.
if (experience+ability > pay)
{
document.write("Ask for more money")
}
|
|
|
|
 |
|
 |
Can't find the text file though, Hmmm...
|
|
|
|
 |
|
 |
First of all I really want to get this counter to work for me. It seems like this could be a great counter to use.
But I'm having problems getting the Hit Counter to work.
The Programs I used to create my Web Pages are -- Macromedia DreamWeaver & WebMatrix. Operating System is XP Professional.
I also have the ASP 1.0 Framework installed.
Here's what I did so far --
1)Inside my Application where my webpages are located, I've created a Folder Titled Counter which is where (Counter.aspx, pdy.gif, .txt ) are located.
2)I've installed <img src="counter/counter.aspx?src=pdy.gif&digits=5&id=countername"> into my WEB Page.
Located inside the body tags - i.e.
<body>
<form runat="server">
<img src="counter/counter.aspx?src=pdy.gif&digits=5&id=countername">
</form>
</body>
</html>
3)The counter.aspx is left untouched - I did not alter it in any way.
4)Now when I open and run my Web Page -- the Web Page opens but there is No Hit Counter Image there. And the address reads http://localhost/MyApplication/Mywebpage.aspx
The .txt file is created - so it must be trying to work. Do you suppose its a IIS Permissions issue? How and where can I fix this. I really would like to get this to work.
Can you give any help that would be great!!! any & all Suggestions Welcome. Thanks In Advance.
|
|
|
|
 |
|
 |
I was trying this code out on a Apache web server, but no success yet. I am looking into permissions and what not, but if anyone knows if aspx is support or not support, any information would be great. Thank you.
|
|
|
|
 |
|
 |
The .NET Framework must be supported on the webserver you are using. So I guess that the answer to your question can only be answered by another series of questions... Do you use Windows or *Nix on your server? If you have *Nix, then do you have MONO installed? If you have Windows with Apache as the web server, then you may need to check as to weather or not you need MONO installed to allow apache interaction. If you have Windows, then I would suggest that you use IIS as your web server. IIS allows you to do far more than the current MONO build allows you to do.
|
|
|
|
 |
|
 |
Check out mod_aspdotnet for Apache at http://httpd.apache.org/cli/introduction
|
|
|
|
 |
|
 |
I followed the instructions, but had to make a few changes to let it work. 1. Add the line <%@ Page Language="VB" Debug="true" %> to the top of counter.aspx if you are using C# 2. Change the name of the graphic file that you are using. I used the default one in the download (pdy.gif) So change: <img src="counter/counter.aspx?src=digits.gif&digits=5&id=countername"> to <img src="counter/counter.aspx?src=pdy.gif&digits=5&id=countername"> Then it should work.
|
|
|
|
 |
|
 |
I followed your steps exactly and made my own folder and all that but the image never comes up on my page.....any ideas? by the way the write permissions are set correctly
|
|
|
|
 |