I want to open a new tab when a button is clicked, the button that is pressed exists in the iframe.
I use this code -
string tempabc = "javascript:window.open('ReportViewer.aspx?ReportType=" + rptnew + "&Billno=" + billno + "&Mail=" + "Mail" + "&CCMail=" + CCMail + "&Subject=" + txtSubject.Text + "&MailBody=" + txtMailBody.Text + "')";
ClientScript.RegisterStartupScript(this.GetType(), "script", tempabc, true);
but he should not show the result.
then I can use this code -
Response.Redirect("ReportViewer.aspx?ReportType=" + rptnew + "&Billno=" + billno + "&Mail=" + "Mail" + "&CCMail=" + CCMail + "&Subject=" + txtSubject.Text + "&MailBody=" + txtMailBody.Text + "'");
It will open the next page on the same Iframe.
What can I do.
On my .aspx page, I can use those tags.
<body>
<form id="form1" runat="server">
<div>
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</asp:ToolkitScriptManager>
<asp:Panel ID="PanelMail" runat="server">
<asp:UpdatePanel ID="UpdatePanel15" runat="server">
<ContentTemplate>
<table>
<tr>
<td colspan="2" style="padding-top: 14px; padding-bottom: 10px;">
<center>
<asp:Button ID="BtnMail" Style="" Text="Mail" CssClass="btnn" runat="server" OnClick="BtnMail_Click"
OnClientClick="return MailSubmit();" />
</center>
</td>
</tr>
</table>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="BtnMail" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
</asp:Panel>
</div>
</form>
</body>
source
share