Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have to show my table data in gridview -- they are such as

Job_No
Joining Date, JOB TITLE ,
so when a user clicks on a particular job in the jobs listed in JOBTITLE column
,then a new page according to that job will open with that particular job
information ????????????????

Pls help ..thanks in advace
Posted
Comments
Sandeep Mewara 8-Feb-13 15:38pm    
What have you tried? Where are you stuck? Be specific.

 
Share this answer
 
Comments
sr_24 18-Feb-13 7:12am    
Thanks Pallavi Wailar
Quote:
XML
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
        onrowcommand="GridView1_RowCommand">
        <Columns>
            <asp:BoundField DataField="id" HeaderText="id" />
            <asp:BoundField DataField="name" HeaderText="name" />
            <asp:TemplateField HeaderText="download">
            <ItemTemplate>
            <asp:LinkButton ID="lbtn" runat="server" Text="download" CommandName="downld" CommandArgument='<%#Eval("id") %>'></asp:LinkButton>
            </ItemTemplate>
            </asp:TemplateField>

        </Columns>
    </asp:GridView>

-------------------------------------------------------------------------
C#
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
   {
       if (e.CommandName == "downld")
       {
           string id = e.CommandArgument.ToString();

       }
   }


 
Share this answer
 
Comments
sr_24 13-Feb-13 1:27am    
thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900