need help wit creating dynamic links
-
hi i am trying to create a website with dynamic links. my idea is to use a datalist and link it wit my ms sql database so depending on how many records i have in my ms sql database it would have the same amount of links created. also i would like the links to be images which names can be found in the same ms sql database. is this possible? would any one please guild me on how to do this as i saw many web site wit this feature and would like to learn them pls
-
hi i am trying to create a website with dynamic links. my idea is to use a datalist and link it wit my ms sql database so depending on how many records i have in my ms sql database it would have the same amount of links created. also i would like the links to be images which names can be found in the same ms sql database. is this possible? would any one please guild me on how to do this as i saw many web site wit this feature and would like to learn them pls
Put a repeater into your page, define how each row looks and then bind your data from db to the repeater.
-------------------------------------------------------- My portfolio & development blog Q:What does the derived class in C# tell to it's parent? A:All your base are belong to us!
-
hi i am trying to create a website with dynamic links. my idea is to use a datalist and link it wit my ms sql database so depending on how many records i have in my ms sql database it would have the same amount of links created. also i would like the links to be images which names can be found in the same ms sql database. is this possible? would any one please guild me on how to do this as i saw many web site wit this feature and would like to learn them pls
a repeater will be a good choice for ur problem. datlist is used if u need to make changes to the data. since u just need some links to another page, it is always better to use repeater. love, lavanya
-
hi i am trying to create a website with dynamic links. my idea is to use a datalist and link it wit my ms sql database so depending on how many records i have in my ms sql database it would have the same amount of links created. also i would like the links to be images which names can be found in the same ms sql database. is this possible? would any one please guild me on how to do this as i saw many web site wit this feature and would like to learn them pls
Hi, Yes repeater is an good option. You can do it as: Code: qrystr = "select link_text,url from url_links" adaplnk = New SqlDataAdapter(qrystr, conn) adaplnk.Fill(drlnk) y = drlnk.Rows.Count Repeater2.DataSource = drlnk Repeater2.DataBind() Design: <%if y> 0 then%> < asp:repeater id="Repeater2" runat="server" > < ItemTemplate > < a target="_blank" href="<%#DataBinder.Eval(Container.DataItem, "url")%>" class="popurl" > < IMG height="11" src="images foldername/<%#DataBinder.Eval(Container.DataItem, "link_text")%>" width="14" border="0 >< /a >< /ItemTemplate > < /asp:repeater > <%end if%>
Know is Drop, Unknown is Ocean
-
Hi, Yes repeater is an good option. You can do it as: Code: qrystr = "select link_text,url from url_links" adaplnk = New SqlDataAdapter(qrystr, conn) adaplnk.Fill(drlnk) y = drlnk.Rows.Count Repeater2.DataSource = drlnk Repeater2.DataBind() Design: <%if y> 0 then%> < asp:repeater id="Repeater2" runat="server" > < ItemTemplate > < a target="_blank" href="<%#DataBinder.Eval(Container.DataItem, "url")%>" class="popurl" > < IMG height="11" src="images foldername/<%#DataBinder.Eval(Container.DataItem, "link_text")%>" width="14" border="0 >< /a >< /ItemTemplate > < /asp:repeater > <%end if%>
Know is Drop, Unknown is Ocean