<asp:button id="Button1" name="cmd_add_key" runat="server" OnClick="add_keys" Text="Attach keys" /> <asp:ToolkitScriptManager ID="ToolkitScriptManager2" runat="server"></asp:ToolkitScriptManager> <asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" PopupControlID="Panl1" DropShadow="true" TargetControlID="cmd_add_key" CancelControlID="cmd_cancel" ></asp:ModalPopupExtender> <asp:Panel ID="Panel1" runat="server" CssClass="#transparent" align="center" style = "display:none; background-color:White;"> <iframe style=" width: 800px; height: 300px;" id="Iframe1" src="getKeysforAddUpdatePropertyKey.aspx?PropertyId=324" runat="server"></iframe> <br/> <asp:Button ID="Button2" runat="server" Text="Close" class="btn btn-primary"/> </asp:Panel>
protected void add_keys(object sender, EventArgs e) { string url = "getKeysforAddUpdatePropertyKey.aspx?PropertyId=" + txt_property_id.Text; irm1.Attributes["src"] = url; }