deepa ashwi

deepa ashwi

  • NA
  • 109
  • 602.5k

redirect to another page while click on item of a repeater

Mar 23 2014 6:05 AM
Now i want when i click on any item of repeater it will redirect to another page along with query string.. whose value comes from database like (name). Actually what i want to do when i click on any item i want to redirect to user detail-page along with its user information.

following is my code:
<asp:Repeater ID="repeator1" runat="server">     <HeaderTemplate>        </HeaderTemplate>     <ItemTemplate>       <table>       <tr>     <td>    <asp:Label ID="name" runat="server"  Text='<%#Eval("Name")%>'></asp:Label>     </td>     <tr>    <td>  <asp:Image Width="100" ID="Image1" ImageUrl='<%# Bind("Logo", "~/Images/{0}") %>' runat="server" />    </td>     </tr>     </tr>     </table>     </ItemTemplate>       </asp:Repeater>



code behind:

protected void Page_Load(object sender, EventArgs e)     {         SqlConnection con = new SqlConnection(@"data source=#######;Integrated Security=true;initial catalog=#####");           con.Open();         SqlCommand cmd = new SqlCommand("select * from Allapps", con);         DataSet ds = new DataSet();         SqlDataAdapter da = new SqlDataAdapter(cmd);         da.Fill(ds);         repeator1.DataSource = ds;         repeator1.DataBind();   }

Answers (2)