Click here to Skip to main content
15,890,512 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: On logout prevent clicking back button to get back in Pin
Ennis Ray Lynch, Jr.12-Nov-08 7:41
Ennis Ray Lynch, Jr.12-Nov-08 7:41 
Questionsome controls on user control do not preserve viewstate Pin
hassanmohamed12-Nov-08 3:48
hassanmohamed12-Nov-08 3:48 
QuestionDCOM Settings for Word application in asp.net Pin
Member 380080912-Nov-08 3:03
Member 380080912-Nov-08 3:03 
QuestionRemoving a project reference from the website's bin folder Pin
Brendan Vogt12-Nov-08 2:45
Brendan Vogt12-Nov-08 2:45 
AnswerRe: Removing a project reference from the website's bin folder Pin
Guffa12-Nov-08 6:56
Guffa12-Nov-08 6:56 
AnswerRe: Removing a project reference from the website's bin folder Pin
Arun Jacob12-Nov-08 23:19
Arun Jacob12-Nov-08 23:19 
GeneralRe: Removing a project reference from the website's bin folder Pin
Member 224165510-May-11 23:50
Member 224165510-May-11 23:50 
QuestionProblem refreshing parent window on child closure Pin
www.Developerof.NET12-Nov-08 2:01
www.Developerof.NET12-Nov-08 2:01 
Hi all,

I have a page where i have a gridview with two buttons which open up two pop ups:


<asp:GridView ID="All_Orders_Grid" runat="server" AutoGenerateColumns="False" AllowSorting="True">
<Columns>
<asp:BoundField DataField="Order_no" HeaderText="Order No" SortExpression="Order_no" />
<asp:BoundField DataField="PARTY_Name" HeaderText="Party" SortExpression="PARTY_Name" />
<asp:BoundField DataField="Order_Date" DataFormatString="{0 :dd/MM/yyyy}" HeaderText="Order Date" HtmlEncode="False" SortExpression="Order_Date" />
<asp:BoundField DataField="Order_Deliv_Date" DataFormatString="{0 :dd/MM/yyyy}" HeaderText="Delivery Date" HtmlEncode="false" SortExpression="Order_Deliv_Date" />
<asp:BoundField DataField="supplier_loc" HeaderText="Supplier Location" SortExpression="supplier_loc" />
<asp:BoundField DataField="bill_loc" HeaderText="Billing Location" SortExpression="bill_loc" />
<asp:BoundField DataField="Order_Value" HeaderText="Ordered Amount" DataFormatString="{0 :#,###,###.00}" SortExpression="Order_Value" />
<asp:TemplateField HeaderText="Cash Advance">
<ItemTemplate>
#
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Option">
<ItemTemplate>
<table style="width: 100%; height: 100%">
<tr>
<td>
<a runat="server" id="lnk_Add">
<INPUT type="button" ID="Button_Add_Items" value="Add Items" /></a></td>
<td>
<a runat="server" id="Lnk_Edit">
<INPUT ID="Button_Edit_Qty" type="button" value="Edit Qty" /></a></td>
</tr>
</table>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="Order_no" HeaderText="Order No" SortExpression="Order_no" />
</Columns>
<RowStyle CssClass="datagrid_row1" />
<HeaderStyle CssClass="datagrid_heading" />
</asp:GridView>
</pre>


In the row datat bound event i wrote:

<pre>Dim btn1lnl As HtmlAnchor = CType(e.Row.FindControl("lnk_Add"), HtmlAnchor)
Dim btn1ln2 As HtmlAnchor = CType(e.Row.FindControl("Lnk_Edit"), HtmlAnchor)
btn1lnl.Attributes.Add("onclick", "return Open_Window(1,'" + e.Row.Cells(9).Text + "')")
btn1ln2.Attributes.Add("onclick", "return Open_Window(2,'" + e.Row.Cells(9).Text + "')")


the javascript i used to open the pop ups is


function Open_Window(option,orderno)
{
if(option==2)
{
var w=window.open('Edit_Order.aspx?ID='+orderno+'&&option=1')
return false;
}
else
{
var w= window.open('Add_OrderItems.aspx?ID='+orderno);
return false;
}
}

When i save the data in the child window i want to refresh the parent page which contains the Gridview. For this purpose i wrote the foll function in the code

<pre>Sub Show_Msg()
Dim scp As String = "<script type='text/javascript'>alert('Data Saved Successfully');CloseAndReload();</script>"
ClientScript.RegisterClientScriptBlock(Me.GetType(), "script1", scp)
End Sub</pre>


and the script use is :


<pre> function CloseAndReload()
{
window.close();
if (window.opener && !window.opener.closed)
{
window.opener.location.reload();
}
}</pre>

the problem i m facing is that this script works on my local host, but when i deployed it to the server, it gives me a message

"This page cannot be refreshed without resending information, Click
retry to send the information again ..."

if i click yes the pop up opens again and the user thinks the data was not saved.If i click no the page is not refreshed and again the user thinks the data was not saved.

Any solutions.......

When you fail to plan, you are planning to fail.
AnswerRe: Problem refreshing parent window on child closure Pin
Brij12-Nov-08 2:31
mentorBrij12-Nov-08 2:31 
GeneralRe: Problem refreshing parent window on child closure Pin
www.Developerof.NET12-Nov-08 3:01
www.Developerof.NET12-Nov-08 3:01 
AnswerRe: Problem refreshing parent window on child closure Pin
Brij12-Nov-08 3:29
mentorBrij12-Nov-08 3:29 
QuestionRedirect to another website form webmetho Pin
Babu.R.K12-Nov-08 2:00
Babu.R.K12-Nov-08 2:00 
AnswerRe: Redirect to another website form webmetho Pin
Brendan Vogt12-Nov-08 2:49
Brendan Vogt12-Nov-08 2:49 
QuestionSelected Text event not working Pin
omlac12-Nov-08 1:55
omlac12-Nov-08 1:55 
AnswerRe: Selected Text event not working Pin
Brij12-Nov-08 2:29
mentorBrij12-Nov-08 2:29 
AnswerRe: Selected Text event not working Pin
omlac12-Nov-08 3:09
omlac12-Nov-08 3:09 
QuestionAudio File Bookmarking and Highlighting with Text Links Pin
srisant12-Nov-08 0:54
srisant12-Nov-08 0:54 
AnswerRe: Audio File Bookmarking and Highlighting with Text Links - CROSS POST Pin
Ashfield12-Nov-08 1:08
Ashfield12-Nov-08 1:08 
QuestionAdding Programmatically Buttons to an asp.net page... Pin
Mahhouraaaaaa12-Nov-08 0:46
Mahhouraaaaaa12-Nov-08 0:46 
AnswerRe: Adding Programmatically Buttons to an asp.net page... Pin
Brij12-Nov-08 2:25
mentorBrij12-Nov-08 2:25 
AnswerRe: Adding Programmatically Buttons to an asp.net page... Pin
Padmanabh Ganorkar12-Nov-08 20:25
Padmanabh Ganorkar12-Nov-08 20:25 
QuestionRegarding the Events raised from Windows Application Pin
Member 459552812-Nov-08 0:18
Member 459552812-Nov-08 0:18 
Questionpaypal Pin
joindotnet12-Nov-08 0:06
joindotnet12-Nov-08 0:06 
AnswerRe: paypal Pin
Ashfield12-Nov-08 1:10
Ashfield12-Nov-08 1:10 
GeneralRe: paypal Pin
joindotnet12-Nov-08 1:12
joindotnet12-Nov-08 1:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.