Login    Forum    Search    FAQ   Blog

Board index » Server Side Development » ASP 3.0




 Page 1 of 1 [ 7 posts ] 



Author Message
 Post subject: reload or to rebind the data of the parent page
 Post Posted: Sun Nov 22, 2009 2:30 pm 
Offline

Joined: Sat Feb 21, 2009 12:32 pm
Posts: 81
Hello!!! every one!!

I have a page for displaying the record details 4m an object datasource.
i have includded a button 4 each record nd by clicking on it a popup
window appears and display a form 2 update da details of dat record.
After user press da save button on da form, how could I reload da parent
page r rebind data on it so dat da updated data could be shown?



Thanks in advance,


Top 
 Post subject: Re: reload or to rebind the data of the parent page
 Post Posted: Sun Nov 22, 2009 2:31 pm 
Offline

Joined: Sat Feb 21, 2009 11:06 am
Posts: 1794
You could use js to reload da parent page usin da code below

Code:
Button1.Attributes.Add("onclick","window.opener.location.reload(true);");


Top 
 Post subject: Re: reload or to rebind the data of the parent page
 Post Posted: Sun Nov 22, 2009 2:31 pm 
Offline

Joined: Sat Feb 21, 2009 12:32 pm
Posts: 81
Hi



Thanks 4 your answer, however wen da parent page reload it prompt a
mess :

"Todisplay the webpage again, Internet Explorer needs to resend the information you've previously submitted. If you were making a purchase, you should click Cancel to avoid a duolicate transaction. Otherwise click Retry to display the webpage again."

ANe othr method to force it retry? As I dun want dis appear ..

Thanks,'


Top 
 Post subject: Re: reload or to rebind the data of the parent page
 Post Posted: Sun Nov 22, 2009 2:31 pm 
Offline

Joined: Sat Feb 21, 2009 1:08 pm
Posts: 549
Try da below code instead which would set da url to da old one
instead of the reloading.

Code:
Button1.Attributes.Add("onclick","var url = window.opener.location.href;window.opener.location.href = url;");


Top 
 Post subject: Re: reload or to rebind the data of the parent page
 Post Posted: Sun Nov 22, 2009 2:31 pm 
Offline

Joined: Sat Feb 21, 2009 12:32 pm
Posts: 81
Perfect! Many thanksSmile


Top 
 Post subject: Re: reload or to rebind the data of the parent page
 Post Posted: Sun Nov 22, 2009 2:32 pm 
Offline

Joined: Sat Feb 21, 2009 11:06 am
Posts: 1794
ya

it was not hidin da MsgBox Man

Code:

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        'Dim sb As StringBuilder = New StringBuilder()
        'sb.Append("<script language='javascript'>")
        'sb.Append("    window.opener.document.forms(0).submit();")
        'sb.Append("    window.close();")
        ''  sb.Append("   return false;")
        '' sb.Append("parent.window.opener.document.location.reload();")
        'sb.Append("</")
        'sb.Append("script>")
        'If (Not IsClientScriptBlockRegistered("clientScript")) Then
        '    RegisterClientScriptBlock("clientScript", sb.ToString())
        'End If
        Button1.Attributes.Add("onclick", "var '~\Employees.aspx' = window.opener.location.href;window.opener.location.href = '~\Employees.aspx';")
        Dim s As String = "<script>window.close();</script>"
        RegisterClientScriptBlock("close", s)
    End Sub

  ===============


i have also tried da commentd code .. not hidin da MsgBox Sad


Top 
 Post subject: Re: reload or to rebind the data of the parent page
 Post Posted: Sun Nov 22, 2009 2:32 pm 
Offline

Joined: Sat Feb 21, 2009 12:32 pm
Posts: 81
thank u in advance!!


Top 
Display posts from previous:  Sort by  
 
 Page 1 of 1 [ 7 posts ] 




Board index » Server Side Development » ASP 3.0


Who is online

Users browsing this forum: No registered users and 1 guest

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron