Jump to content

Server Controls


soona

Recommended Posts

Hi,i want to redirect some different page from gridview.When i click a particular row of column button on gridview .It will be redirect different page not a same page.For example: In gridview have 2 rows and 3columns.For each 2 rows have a buttons with data column.when i will click the 1st rowth of button in gridview. this button event should redirect some page(1stpage.aspx). and when i will click 2nd rowth of button in gridview.this button event will redirect some page. but do not redirect a same page(2ndpage.aspx).This can make to possible?----This code for listed out the datas on gridview <asp:GridView ID="Gridview1" runat="server" OnRowDataBound="Gridview1_RowDataBound"> <Columns> <asp:TemplateField> <ItemTemplate> <asp:Label ID="id" runat="server" Text='<%#Eval("ID")%>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField> <ItemTemplate> <asp:Label ID="name" runat="server" Text='<%#Classname1.getname(Container.DataItem)%>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField> <ItemTemplate> <uc:item ID="item" runat="server" itemname='<%#(item)Container.DataItem%>' /> </ItemTemplate> </asp:TemplateField> <asp:TemplateField> <ItemTemplate> <asp:Button ID="dbtn1" runat="server" Text="Click" /> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> Page_Load(){ itemColn items = Items(); if (items.Count > 0) { Gridview1.DataSource = items; Gridview1.DataBind(); } else { Gridview1.Visible = false; }} ----Please advise me . where can i make my related changes.Many thanks

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...