following is my code:
Bash
asp:Repeater ID="repeator1" runat="server"> HeaderTemplate> /HeaderTemplate> ItemTemplate> table> tr> td> asp:Label ID="name" runat="server" Text=''>/asp:Label> /td> tr> td> asp:Image Width="100" ID="Image1" ImageUrl='' runat="server" /> /td> /tr> /tr> /table> /ItemTemplate> /asp:Repeater>code behind:
Java
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(); }
Lakshmanan Sethu SankaranarayanRank #124 · 17.7K reputationPosted Mar 23, 2014, 2:29 AM EDT
Brijendra GautamRank #1,900 · 778 reputationPosted Mar 23, 2014, 3:51 AM EDT
OR
Use ItemDataBound event and generate the url in code behind, can use hiddenfield for fetching data on code behind.