473,796 Members | 2,536 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Force a complete reload of a page.

UJ
Is there any way I can have a page reload itself where it will completely
reload from scratch. I have a condition where a person click a button and
the easiest way to handle it would be to have the button do the DB stuff it
needs to do and then load the page from scratch - not post back.

I've tried putting in a server.transfer in the routine that does the button
click but it seems to get into an infinite loop.

TIA - Jeff.
Jul 12 '06 #1
3 1921
Hey Jeff,
Just create a javascript function to refresh the page. Then just add
that function to the asp.net button using
'Btn.Attributes .Add("onclick", "your js function name")

Thanks

UJ wrote:
Is there any way I can have a page reload itself where it will completely
reload from scratch. I have a condition where a person click a button and
the easiest way to handle it would be to have the button do the DB stuff it
needs to do and then load the page from scratch - not post back.

I've tried putting in a server.transfer in the routine that does the button
click but it seems to get into an infinite loop.

TIA - Jeff.
Jul 12 '06 #2
And the javascript will be

location.reload (true);

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]

<ma**********@g mail.comwrote in message
news:11******** **************@ m79g2000cwm.goo glegroups.com.. .
Hey Jeff,
Just create a javascript function to refresh the page. Then just add
that function to the asp.net button using
'Btn.Attributes .Add("onclick", "your js function name")

Thanks

UJ wrote:
>Is there any way I can have a page reload itself where it will completely
reload from scratch. I have a condition where a person click a button and
the easiest way to handle it would be to have the button do the DB stuff
it
needs to do and then load the page from scratch - not post back.

I've tried putting in a server.transfer in the routine that does the
button
click but it seems to get into an infinite loop.

TIA - Jeff.

Jul 13 '06 #3
UJ
Actually I do a response.redire ct to itself and it works great.

Thanks anyway.

"Eliyahu Goldin" <re************ *@monarchmed.co mwrote in message
news:uU******** ******@TK2MSFTN GP05.phx.gbl...
And the javascript will be

location.reload (true);

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]

<ma**********@g mail.comwrote in message
news:11******** **************@ m79g2000cwm.goo glegroups.com.. .
>Hey Jeff,
Just create a javascript function to refresh the page. Then just add
that function to the asp.net button using
'Btn.Attribute s.Add("onclick" ,"your js function name")

Thanks

UJ wrote:
>>Is there any way I can have a page reload itself where it will
completely
reload from scratch. I have a condition where a person click a button
and
the easiest way to handle it would be to have the button do the DB stuff
it
needs to do and then load the page from scratch - not post back.

I've tried putting in a server.transfer in the routine that does the
button
click but it seems to get into an infinite loop.

TIA - Jeff.


Jul 13 '06 #4

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

Similar topics

4
42789
by: Martin | last post by:
This is probably more of an HTML question than PHP. Perhaps someone here can answer or point me to a proper newsgroup. How can I force the browser to reload an image from the server? I have a page where the user can set some parameters and click a <submit> button. A PHP script then generates a .png graphic and saves it to disc. An html statement (<p><img src="gMyGraphic.png"></p>) then sends the graphic out to the browser.
1
10858
by: Marco Maroni | last post by:
How to force image refresh on client browser ? Is ti possible to force the refresh of the same image (tha was changed server-side) to the client, without user press Contrl+F5 in IE ? - Marco
1
1288
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I force a reload from the server/prevent caching? ----------------------------------------------------------------------- To reload a page, use location.reload(). However, this depends upon the cache headers that your server sends. To change this, you need to alter the server configuration. A quick fix on the client is to change the page URI so...
2
3825
by: =?Utf-8?B?U2lsa0NpdHlGbG9yaWRh?= | last post by:
I have a web page "PgA" with a GridView. I open another page "PgB" in a new window. On PgB, they do some things that affect the underlying data for the GridView on PgA. When the user is done with PgB, they click a button that executes this VB: Protected Sub Close_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Close.Click 'Do some stuff Response.Write("<script language='javascript'{...
0
9680
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10456
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10174
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10012
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9052
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6788
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5442
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5575
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2926
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.