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

Home Posts Topics Members FAQ

how to refresh webform from other webform


how to refresh webform from other webform

I have 2 webform, i want if webform A was close then webform B wil
refresh.

And the problem second:
how to catch packet on the network in C#.

thanks

--
hqdtec
-----------------------------------------------------------------------
hqdtech's Profile: http://www.msusenet.com/member.php?userid=63
View this thread: http://www.msusenet.com/t-186957990

Nov 17 '05 #1
1 3504
In article <hq************@no-mx.msusenet.com>, hqdtech.1nvg5z@no-
mx.msusenet.com says...

how to refresh webform from other webform

I have 2 webform, i want if webform A was close then webform B will
refresh.

And the problem second:
how to catch packet on the network in C#.

thanks.
--
hqdtech
------------------------------------------------------------------------
hqdtech's Profile: http://www.msusenet.com/member.php?userid=633
View this thread: http://www.msusenet.com/t-1869579909


Assuming you are trying to mimic the behavior of a windows forms
subform/popup/modal dialog, there are several ways to do this.

-- Disclaimer -- I'm doing this from my head so don't expect a cut and
paste to work without some debugging.

1.)Put a javascript function on your subform something like this:

function refreshopener()
{
if refresh==true
{
window.opener.location.reload();
window.close()
}
}

this, of course relies on a page-level variable called "refresh" so
you'll have to add that earlier:

var refresh=false;

Ok, now on the body declaration of your page add "OnLoad=refreshopener
()" which means that this function will fire everytime the page is
loaded (including postbacks ;))

Now, on your subform, I'm assuming there's some server-side event that
is fired that causes your page to refresh. After you've done all you
server-side processing, set the variable refresh to "true".

i.e. - Page.RegisterClientScriptBlock("refresher","<scrip t language-
javascript>refresh=true;</script>");

(You'll need to make sure that this script fires AFTER the variable
declaration above or this won't work).

As usual, you may find a simpler way, however this also allows me to do
other cleanup work within the refreshopener() function. I'll warn you
that I do tend to over complicate things ;)

SRC
Nov 17 '05 #2

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

Similar topics

3
by: VB Programmer | last post by:
My webform is datadriven and auto refreshes every 10 seconds. Is there a way to avoid the "flicker" when I refresh the page?
10
by: tasmisr | last post by:
This is an old problem,, but I never had it so bad like this before,, the events are refiring when clicking the Browser refresh button. In the Submit button in my webform, I capture the server side...
1
by: koby maman | last post by:
Hello I have two questions 1. I have a webform A, which by clicking on certain control, i open in a new window a webform B I want, when the webform B is closed, to refresh (Page_Load ? ) the...
3
by: *no spam* | last post by:
How do you refresh the controls on a panel? I've got a VB webform which contains a panel. On that panel is a checkbox and a textbox. I'd like the textbox to appear when the checkbox is checked...
1
by: Pravin | last post by:
Hi, I have a ASP.net webform opened. I want to open a model dialog box on the button click. When the dialog box is opened, the webform is shown blank because the post back is not complete unless...
1
by: ACaunter | last post by:
Hi, I was wondering if there was asp.net webform (serverside) code which will refresh the page. I get a download dialog box that keeps poppin up everytime i click on any buttons on my page and i...
2
by: NATE | last post by:
Could you tell me how I can refresh a aspx webform without press a button. I need to refresh a text box periodically without the action of the user
2
by: NN | last post by:
Hello, I have a problem :) I have a webform in which I have the event Onload that refers to a script that find in a database for an image and then show it in the WebForm. The problem is that I...
4
by: =?Utf-8?B?TWlrZQ==?= | last post by:
Hi. If an ASP.NET page postsback, for example, after a button is clicked, and then I refresh the page (ie, by pressing F5 key), why does the same event occur when I press F5 as it did when I...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have 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
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
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...
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
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,...
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...

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.