sssor1 0 Newbie Poster

Hi everyone,

I'm trying to write and application where some fields of a database table are viewed via "GridView". one of the columns of the gridview is a "Commandfield" which contains a "SelectButton". When the buttons is clicked a new window is supposed to open and show more fields of that entry via "DetailsView".

My problem. I have no idea how it can be managed that when the button of "Commandfield" is clicked a new window opens. I just know how to make the result on the same page.

I am vet new to asp.net, so please help me to solve this problem.
Below is the code:

<%@ Page Language="C#" MasterPageFile="BillnBen.master" Title="View Our Books" StylesheetTheme = "skinFile"%>  

    <asp:Content ID="mainContent" ContentPlaceHolderID="CPH1" Runat="Server">
        
        <br />
        <asp:SiteMapPath class = "breadcrumbs" ID="SiteMapPath1" runat = "server" SkinID = "SiteMapPathIcon" />
        
        <div class="mainpage">Our Books</div>
        
        <p />
        <asp:accessdatasource runat="server" 
            DataFile="~/SBOOKS.mdb" 
            id="BooksDS" 
            SelectCommand="SELECT [cover_image], [book_title], [book_author], [book_price], [ISBN], [APN], [release_date] FROM [books] ORDER BY [book_title]" >
            
            <SelectParameters>
                
                <asp:Parameter DefaultValue="Gary Crew" Name="book_author" Type="String" />
            
            </SelectParameters>
        
        </asp:accessdatasource>
        
       [B] <asp:GridView class ="gridview" ID="GridView1" runat="server" AutoGenerateColumns="False" 
            BackColor="#581818" BorderColor="White" BorderWidth="2px" CellPadding="2" 
            CellSpacing="2" DataSourceID="BooksDS" ForeColor="White"
            AllowPaging = "true" PageSize = "10" 
            AllowSorting = "true" >
            <PagerStyle CssClass = "pager" HorizontalAlign = "Center" />
            <PagerSettings FirstPageText = "First" LastPageText = "Last" 
            Position="TopAndBottom" Mode = "NumericFirstLast" />
            
            <Columns>
                
                <asp:ImageField DataImageUrlField = "cover_image"  HeaderText="Cover Image" />
                <asp:BoundField DataField="book_title" HeaderText="Title" SortExpression="book_title" />
                <asp:BoundField DataField="book_author" HeaderText="Author" SortExpression="book_author" />
                <asp:BoundField DataField="book_price" HeaderText="Price"  />
                <asp:BoundField DataField="ISBN" HeaderText="ISBN" SortExpression="ISBN" />
                <asp:BoundField DataField="APN" HeaderText="APN"/>
                <asp:BoundField DataField="release_date" HeaderText="Release Date" />  
                <asp:CommandField SelectText="View Details" ShowSelectButton="true" ItemStyle-VerticalAlign = "Middle" />
                
            </Columns>[/B]
            <HeaderStyle BackColor="#CC0000" Font-Bold="True" Wrap="False" />
        </asp:GridView>
    </asp:Content>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.