473,472 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Running JavaScript in ASP.NET

4 New Member
Howdy Folks.

I wrote a webapp that finds images and allows the user to delete or add them. I load the images in a datagrid and page through them. The problem I'm finding is that even though an Image-Add will update the image on the page, when I delete an image, it is still on the page after a postback.
If I press F5, the image will update to a blank placeholder (like it should).

How can I programmatically force the F5 refresh without pressing F5?

I assume I have to write a JavaScript, but am fairly new to the twists of the language. I think I have to execute a window.location.reload(true); command.
But I'm not sure how to run it from inside ASP code.

Any suggestions?

Much thanks.
Oct 24 '06 #1
2 2289
iam_clint
1,208 Recognized Expert Top Contributor
you would just
Expand|Select|Wrap|Line Numbers
  1.  response.write "<script>window.location.reload(true);</script>"
when you want this code to be ran.
Oct 24 '06 #2
Petra
13 New Member
you would just
Expand|Select|Wrap|Line Numbers
  1.  response.write "<script>window.location.reload(true);</script>"
when you want this code to be ran.
hi!
i tried the same,
but
response.write "<script>window.location.reload(true);</script>"

doesn't work.

i use microsoft web developer but
"<script>window.location.reload(true);</script>" is not a valid string.
could you please help me?

thank you!!
petra
Oct 26 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Herve MAILLARD | last post by:
Hi, J'ai un bouton ASPX qui doit déclencher un script java. I have an ASPX button running a javascript. To do this, I have added in the codebehind :...
1
by: rajesh | last post by:
var fixedX = -1 // x position (-1 if to appear below control) var fixedY = -1 // y position (-1 if to appear below control) var startAt = 0 // 0 - sunday ; 1 - monday var showWeekNumber =...
1
by: daniel_xi | last post by:
Hi all, I am running a VS 2003 .NET project on my client machine (Win 2000 SP4, ..NET framework 1.1), running an ASP.NET application on a remote web server (Win 2000 Server, IIS 6.0, .NET...
3
by: =?Utf-8?B?Um9iZXJ0IENoYXBtYW4=?= | last post by:
Hi, Fairly easy to create one running total for a gridview but what if you have dozens of them? I have a gridview that allows bulk editing (all rows at once) and have it set up so that, on data...
2
by: an96su | last post by:
Hi, I'm new to php. i'm trying to send information from my php (client) script to a website that is running javascript. Here is an extract of the server's response to my initial http request. ...
14
by: lmttag | last post by:
Hello. We're developing an ASP.NET 2.0 (C#) application and we're trying to AJAX-enable it. We're having problem with a page not showing the page while a long-running process is executing. So,...
1
by: dev175 | last post by:
I have some problem with controlling the number of times a javascript code is running my problem is like if we open a new browser page and open the same link again the javascript code runs once...
6
by: Chris Curvey | last post by:
Hi All, I have inherited a web page that includes lots of javascript. When I click on some things, the CPU utilization on the browser machine goes to 100% and the browser becomes unresponsive...
12
by: Peter Michaux | last post by:
I'm writing a server-side web application framework using Mozilla's Rhino JavaScript engine. My two primary motivations are so I can write code on server and client sides without needing to switch...
33
by: Sunny | last post by:
Hi, Sometime, when your script is too big, IE Gives you a warning "Stop Running This Script" A script on this page is causing Internet Explorer to run slowly. Does anyone knows, How to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
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: 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.