Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8345629
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T06:44:36+00:00 2026-06-09T06:44:36+00:00

Here in my form, i need to open a new window when i click

  • 0

Here in my form, i need to open a new window when i click the edit button in my grid view.also the corresponding ID value must be passed to the new window.I wrote the code for opening in a new window but it s not working.I searched and couldnt find how to send the selected record’s ID value to the new window.Help me how to do this.

     <asp:GridView ID="gridUserDetails" runat="server" BackColor="White" 
                                BorderColor="#336666" BorderStyle="Double" BorderWidth="3px" CellPadding="4" 
                                GridLines="Horizontal" AutoGenerateColumns="False" AllowSorting="true"  
                                onselectedindexchanged="gridUserDetails_SelectedIndexChanged" onsorting="SortingGridData">
                                <Columns>                                     
                           <asp:BoundField DataField="ID"  HeaderText="ID" SortExpression="ID" />
                           <asp:BoundField DataField="Name"  HeaderText="Employee Name" SortExpression="Name" />
                           <asp:BoundField DataField="Address" HeaderText="Employee Address" SortExpression="Address" />
                           <asp:BoundField DataField="Email"  HeaderText="Employee Mail"  SortExpression="Email"/>
                           <asp:BoundField DataField="Department"  HeaderText="Department"  SortExpression="Department"/>
                    <asp:TemplateField>
                    <ItemTemplate>
                    <asp:Button ID="btnEdit" CausesValidation="false" runat="server" Text="Edit" 
                    onClientClick="windowopen()"/>


                    </ItemTemplate>
                    </asp:TemplateField>

                                </Columns>
                                <FooterStyle BackColor="White" ForeColor="#333333" />
                                <HeaderStyle BackColor="#336666" Font-Bold="True" ForeColor="White" />
                                <PagerStyle BackColor="#336666" ForeColor="White" HorizontalAlign="Center" />
                                <RowStyle BackColor="White" ForeColor="#333333" />
                                <SelectedRowStyle BackColor="#339966" Font-Bold="True" ForeColor="White" />
                                <SortedAscendingCellStyle BackColor="#F7F7F7" />
                                <SortedAscendingHeaderStyle BackColor="#487575" />
                                <SortedDescendingCellStyle BackColor="#E5E5E5" />
                                <SortedDescendingHeaderStyle BackColor="#275353" />

                            </asp:GridView>       

This is the code for my Grid.And below is my javascript

     <script language="javascript" type="text/javascript">
 function windowopen() {
           mywindow = window.open('ISSRegistrationForm.aspx', 'Employee Details', 'height=500, width=1100, status=no, resizable=no, scrollbars=yes, toolbar=no,location=no, menubar=no'
            }
            </script>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T06:44:39+00:00Added an answer on June 9, 2026 at 6:44 am

    Create an anchor(a tag) inside a new TemplateField’s ItemTemplate:

    <asp:TemplateField><ItemTemplate><a href="onclick="javascript:windowopen('<%#Eval("ID") %>')">Click Here</a></ItemTemplate></asp:TemplateField>
    

    and your JavaScript function should look like this:

        function windowopen(id) {
    mywindow = window.open('ISSRegistrationForm.aspx?id='+id, 'Employee Details', 'height=500, width=1100, status=no, resizable=no, scrollbars=yes, toolbar=no,location=no, menubar=no')
                }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's the problem, I need to validate the form before submitting in the next
I want to open a new window with a textfield that copies what you
EDIT: More detail here. Basically if you 1. open a tab1 to url1 (GET
I'm trying to open a new form from within an event handler in the
I modified this simple countdown timer form here: https://github.com/lunaryorn/snippets/blob/master/qt4/countdown.py as follows. Now I want
To give more information I am using the modular form here: http://jqueryui.com/demos/dialog/#modal-form `b(e.target).zIndex` is
I've been putting together my first Ajax powered form ( here ), with the
Summary Below is the full question (a bit complicated in its full form) here's
The current form is here . It is not complete, and only a couple
I have this form right here, where the user will add the start date

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.