I need help to make my AddResetReason.aspx page popup when AddReasonButton is clicked. Right now nothing happens.
What I have tried:
Here is the code for AddReasonButton which is on Default page.
<asp:Button ID="AddReasonButton" runat="server" Text="+" Font-Size="10"
BackColor="RoyalBlue" ToolTip="Add Reason" ForeColor="White"
OnClick="AddRequestor_Click" Height="26px" Width="26px"/>
Here is AddResetReason.aspx page
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AddResetReason.aspx.cs" Inherits="FTACaseReseting.PopUps.AddResetReason" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Add Reset Reason</title>
</head>
<body>
<form id="AddResetReasonForm" runat="server" title="Add Reset Reason">
<div style="width: 270px; height:160px; margin: 0 auto">
<table>
<tr>
<td><asp:Label ID="ResetReasonLabel" runat="server" Text="New Rejection Reason:"
Font-Size="8.25pt" Height="14px" Width="120px"></asp:Label></td>
</tr>
<tr>
<td><asp:TextBox ID="ResetReasonTextBox" runat="server" Height="20px" Width="206px"></asp:TextBox></td>
</tr>
<tr></tr>
<tr>
<td><asp:Button ID="CancelButton" runat="server" Text="Cancel"
BackColor="RoyalBlue" Font-Size="8.25pt" Height="22px" Width="76px" /></td>
<td><asp:Button ID="AddResetReasonButton" runat="server" Text="Add"
Font-Size="8.25pt" /></td>
</tr>
</table>
</div>
</form>
</body>
</html>
Here is code behind for AddReasonButton. When it is clicked AddResetReason.aspx page should popup. The code I have is not working and I think it is wrong code.
protected void AddReason_Click(object sender, EventArgs e)
{
int intId = 100;
string strPopup = "<script language='javascript' ID='script1'>"
+ "window.open('AddResetReasonForm.aspx?data=" + HttpUtility.UrlEncode(intId.ToString())
"','new window', 'top=90, left=200, width=300, height=160, dependant=no, location=0, alwaysRaised=no, menubar=no, resizeable=no, scrollbars=n, toolbar=no, status=no, center=yes')"
+ "</script>";
ScriptManager.RegisterStartupScript((Page)HttpContext.Current.Handler, typeof(Page), "Script1", strPopup, false);
}