|
I am so bad about it-----
Help me-----------
|
|
|
|
|
The session_end event is Notoriously unreliable. The session doesn't officially end some 20 minutes (depending on settings) after the window is closed. And even that's not guarenteed.
A possible solution might be to use some javascript with the onunload event in the body tag, but that seems iffy at best too.
Sorry I can't be of more help.
|
|
|
|
|
I used a radio and select groups in form, I selected the option I want and then refresh (or submit) the page. But I found that the selection returned to the default pages
How to save the selection I want. With javascript?
I hope some one can give me some help.
Thanks
David
|
|
|
|
|
at last i find a way to solve it
|
|
|
|
|
What is the proper syntax for joining text strings together. I want to add a .txt to the end of a variable so that I can point to it as a file name.
namePrefix = "catalog"
Filename = join(namePrefix, ".txt")
this isn't working so I must not have the correct syntax.
If any one knows what it is I'd be very greatful.
__________________
|
|
|
|
|
Filename = namePrefix & ".txt"
Best regards,
J. Paul Schmidt - ASP Web Developer
http://www.Bullschmidt.com - To put live data on the Web...
|
|
|
|
|
I am developing an ASP.NET application where a user will enter some infomation in a form, the information will be written to a database, and then I want the application to signal the user that the entry was successful or failed. One way to do this is to have the application display a message box. This is easily done with some client-side script, but I don't know how to do it from the server side. I want the message box to display after some server-side processing has taken place. I know that client-side functions can be associated with controls, but I have found that the client-side function of a control is called before its server-side event handlers.
So, is there a way to display a message box from an ASP.NET page?
"What would this country be without this great land of ours?" -Ronald Reagan
|
|
|
|
|
Naresh Karamchetty wrote:
This is easily done with some client-side script, but I don't know how to do it from the server side
Unless you do some hecticly fancy remoting, you cannot get server-side code to pop-up a client-side message box. It just does not work that way.
Best way to do this is have page1.aspx submit to the server, page1_processor.aspx then does the database stuff and then redirects once it is finished to page1_finished.aspx which has a JavaScript/VBScript alert box.
However rather not even use an alert box as they are annoying. Just have a nicely formatted HTML paragraph on the page1_finished.aspx page.
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
The greatest thing you'll ever learn is just to love, and to be loved in return - Moulin Rouge
Alison Pentland wrote:
I now have an image of you in front of the mirror in the morning, wearing your knickers, socks and shoes trying to decided if they match!
|
|
|
|
|
I have an ASP.NET application,I want to do something when user close the Internet explorer or leave my site.Where should I do it?
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
Mazdak wrote:
I have an ASP.NET application,I want to do something when user close the Internet explorer or leave my site.Where should I do it?
There is no fool-proof way and definitley nothing as reliable as you can do in Windows apps.
BUT there is an unload event in HTML.
<body onunload="alert('Where are you going sucker?');">
I must stress that it is not foolproof. It does not always fire and there are ways the user can supress it (a lot of pron sites use this technique to stop you leaving their site, so a lot of pop-up buster software kills the onunload event.)
I also dimly am aware of a "IsConnected" method in ASP (probably ported over to ASP.NET) which you can call from the server side to do some trickery. Not sure about it though.
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
The greatest thing you'll ever learn is just to love, and to be loved in return - Moulin Rouge
Alison Pentland wrote:
I now have an image of you in front of the mirror in the morning, wearing your knickers, socks and shoes trying to decided if they match!
|
|
|
|
|
Thank you!
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
Yep - HttpResponse.IsClientConnected is in ASP.NET
cheers,
Chris Maunder
|
|
|
|
|
What's the best way to resrict access to certain aspx files? Right now I'm using Integrated Windows authentication. Anyone logged into the domain has access (I think). I want to set the default permissons to only allow access to a few aspx files and require a login for access to the entire site.
Todd Smith
|
|
|
|
|
Todd Smith wrote:
Right now I'm using Integrated Windows authentication
Can't you use windows to restrict access for those login????
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
I've got a web app that uses the Microsoft remote scripting engine to run some ASP script on the server.
This application works fine and has always worked fine without any version of the JRE installed. If I install the JRE version 1.3 (English edition) this application still works fine. If I install the JRE 1.3 (international edition) the remote scripting no longer works.
Does anybody have any idea why installing the international JRE would hose my remote scripting?
|
|
|
|
|
The Remote Scripting solution from Microsoft isn't 'international character'-safe. Some characters cause the engine to fail. Have a look at the strings you are sending back and forth.
|
|
|
|
|
I've heard rumours that Microsoft may support Apache in ASP.NET and presumably in Visual Studio .NET.
Does anyone know what percentage of Windows servers are using Apache?
Naturally MS would prefer that everyone uses IIS. However, supporting Apache from within Visual Studio .NET could be a smart move for MS financially.
1) If there are substantial numbers using Apache on Windows and who are using a non-ASP server-side technology they could be persuaded to move to Visual Studio .NET and ASP.NET, thus increasing MS's revenues.
2) Substantial numbers of those running Apache on Unix or Linux servers may have chosen Unix/Linux because they prefer Apache to IIS and Apache has hitherto been better catered for on Unix. With Apache being supported within Visual Studio .NET they might be persuaded to go for Windows and Visual Studio .NET, thus increasing MS's revenues.
Of course, those people running Linux rather than Unix may not be so keen to move to a Windows server. So scenario (1) is probably more likely.
Kevin
|
|
|
|
|
Hello... I'm new in using ASP. I just would like to know how to develop address books using ASP. Thank you.
|
|
|
|
|
There are several articles written here that show how to develop a Guestbook, you should be able to easily modify these to suit your needs. Check the following:
In Plain Vanilla ASP:
ASP.NET Flavor Of The Month:
Nick Parker
|
|
|
|
|
I thought I would just put together a quick page in ASP.NET to replace the old one I have written in ASP that uses the Dundas control.
Anyway, nice and easy, especially with the articles on this site, 10 minutes I have an upload/Download page and a database (SQL2000)
My only problem is it does not work
I have the following code where theFile is a HttpPostedFile object.
1: byte[] myData = new byte[theFile.ContentLength]; <br />
2: theFile.SaveAs (@"c:\test.jpg") ;
3: theFile.InputStream.Read(myData, 0, theFile.ContentLength);<br />
4: dbRow["FileData"] = myData ;
Now, line 2 works fine and I can see the picture saved onto my hard disk, but line 3 does not, the myData array remains full of zeros, but it is set to the correct size in line 1.
What started as a 15 minute job is now taking hours.
Anyone else seen this problem or know what I am doing wrong here?
Thanks
Stephen.
|
|
|
|
|
Found the answer in the end, just needed to reset the InputStream's position to the begining of the file with
theFile.InputStream.Seek (0, System.IO.SeekOrigin.Begin) ;
I had assumed that it would have thrown an exception if it had tried to read beyond the end of the stream.
Stephen
|
|
|
|
|
I manage an Intranet and have been having some problems with some files (.xls, .doc, .ppt, etc.) getting cached into memory when a user downloads them. If the file gets updated, certain users still see the old version for anywhere from ~1 day to ~1 week. I tried everything from refreshing/reloading the pages to clearing all temporary files from the computers but I cannot find a way to force the browser to download the latest version of these files. One thing that confuses me is that this only happens to some users, even though we are on an Intranet with standard computers and standared program settings.
I threw together the following script that solves this problem because it tricks the browser into thinking that it is downloading a file that it has never seen before by assigning it a random variable at the end.
<script type="text/vbscript">
randomize()
document.write ("<a href='filename.xls?id=")
document.write (CInt(RND * 2000))
document.write ("'>Link Name</a>")
</script>
Does anyone have any comments on this or know of a better way to do things?
Chris LaQuerre
Internet Technologies Consultant
|
|
|
|
|
There is a pragma-no cache directive that can be inserted as a meta tag in the header of the html document. I cannot remember it exactly the syntax.
However, the proxy server might cache some html documents, which is generally bad news. In this case the user might hit CTRL+F5 million times and still a cached version will be retrived.
Best regards,
Alexandru Savescu
|
|
|
|
|
Alexpro wrote:
There is a pragma-no cache directive that can be inserted as a meta tag in the header of the html document.
This works for the HTML page itself, but not for the other files (non-HTML documents) that the page is linking to. In my case, I am trying to prevent Microsoft Word, Excel and Powerpoint files from being stored in memory.
Chris LaQuerre
Internet Technologies Consultant
|
|
|
|
|
Hello,
I am using layers for Netscape 4. After defining layers, I am using HTML controls like input box, submit buttons. But these controls are not being displayed after defining layers. If I define these controls before defining layers, these controls are visible.
Can anybody tell me what is the problem?
Thanks
Hitesh
|
|
|
|