Click here to Skip to main content
10,500,000 members (93,702 online)
Rate this:
Please Sign up or sign in to vote.

I have a form with 4 panels in it - and they are using parameters from serverside when loading each one.
On the first 3- I click on a button (I can choose from several buttons in the same panel) and on the last one there's a table with details relaying on the buttons I clicked before.

Now, I want that whenever I change something in another form, it will automatically refresh the first one (I need to see the change in the table on the last panel).
Just to be clear - I don't want to reload the page but only to REFRESH it.

I used window.opener.location.reload() but I'm getting a messegebox saying:
"The page cannot be refreshed without resending the information. Click Retry to send the information again".

After I looked all over the net for a solution, I can't find a solution that will allow refreshing the page and not showing this messege.

At some point I added in the form method="get" <form id="form1" runat="server" method="get"> and the messege stopped showing but now when I want to choose to click another button I can't do post....

So .. can you help me?
maybe there's another way than using panel / update panel and also not openning the table in a different form??

Posted 9-Jan-13 20:19pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

use timer interval 1 so it refresh your data every 1 second...

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Dim connectionstring As String = "Driver=MySQL ODBC 3.51 Driver;Server=localhost;port=3306;uid=root;pwd=admin;Database=elcott;"
        Dim conn As New OdbcConnection(connectionstring)
        Dim da As New OdbcDataAdapter("select * from Userpass where Username like '%" & txSearch.Text & "%'", conn)
        Dim ds As New DataSet
        DataGridView1.DataSource = ds.Tables(0)
        Dim da1 As New OdbcDataAdapter("select * from logs where Username like '%" & txSearch.Text & "%'", conn)
        Dim ds1 As New DataSet
        DataGridView2.DataSource = ds1.Tables(0)
    End Sub
danait25 24-Jan-13 0:58am
thanx but I was looking for a conditional refresh , otherwise I would use meta refresh http-equiv which is much more simple
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

More complicated than I wish to, but eventually I put on my child form this script that refer to a method on my parent form:


then, on my parent form I added an inivisible button that onclick, update my panel and by that, refresh the page. And the I do the click from the method I created (the same one I called on the child form)

first the method I created:

function createpostbackbyclick()

then the button:

<asp:button id="btnclick" runat="server" onclick="refreshme" visible="false" xmlns:asp="#unknown" />

and the function:

function refreshme()

I also had to use session for my parameters but all in all - it works now
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Page.Response.Redirect(Page.Request.Url.ToString(), true);
puskar gupta 10-Jan-13 2:22am
danait25 10-Jan-13 3:21am
I don't understand how to use your solution- where do I need to put it?
If I write it in the code behind of the child page it do nothing..

And about your comment - I can see there only ways to refresh from the same form and not from another page
Rate this: bad
Please Sign up or sign in to vote.

Solution 4



this will refresh another page from a page

you can call function and in that function write code for refresh page .

Read about server.execute()
danait25 24-Jan-13 0:59am
I'll check it out, though I found a sort of solution .

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 23 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100