I have a Edit Button(which is a Image Button) and when I click that ImageButton a new browser window should open and it should load the values previously entered by the user. The new window should contain the old values and now should be able to edit them.

For example,
If a user clicks on the Edit button whose userId= 329 it should open in a new window with the values entered by the user.

<%--<asp:ImageButton ID="ibtnEdit" runat="server" Text="Edit" ToolTip="Edit" ImageUrl="~/images/edit-icon.gif" />--%>
<%--<script type="text/javascript">
function EditInNewWindow()
window.open("abc.aspx?bid="+document.getElementById('<%#Eval("UserID") %>'));


UserId id the column name where the userID is stored.

Can anyone plzz help.

Edited by Uzumaki52: n/a

8 Years
Discussion Span
Last Post by jbisono

This is what i use if i want to open a new page.

I create a static class like this.

public static void OpenWebSite(string webUrl, Control cntrl)
            ScriptManager.RegisterStartupScript(cntrl, cntrl.GetType(), "Open", "window.open('" + webUrl + "');", true);

And then whenever i want to open a particular web site i do this in c# code
this code below goes within the imagebuttonclick event.

OpenWebSite("yoururl.com?parm=paravalue", this);
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.