i have a database , on that i have SeeAlsoPageReference column, i saved value on that with the below code:
String PageRefs = txt_SeeAlsoPageReference.Text;
if (PageRefs.Contains(";"))
{
String[] PageRefArray = PageRefs.Split(';');
for (int i = 0; i < PageRefArray.Length; i++)
{
seeAllpagereference += PageRefArray[i] + "<br/>";
}
}
i save the value in the database like:
ef35988c-9a70-493d-a98a-0320989b1a42
ef35988c-9a70-493d-a98a-0320989b1a42
aspx:
<div id="SeeAlsoDiv">
<asp:Label ID="lbl_SeeAlso" runat="server" Text="See Also" CssClass="lbl_seeAlso"></asp:Label><br />
<asp:HyperLink ID="hyplnk_SeeAlso" href="" runat="server" Text=""></asp:HyperLink>
</div>
i used the code:
DataTable dt3 = DAL.OnlineHelp.PiiloHelp(Session["pageRef"].ToString(), Session["LanguageId"].ToInt32());
if (dt3.Rows.Count > 0)
{
string SeeAlsoPageRef = dt3.Rows[0]["SeeAlsoPageReference"].ToString();
SeeAlsoPageRef = dt3.Rows[0]["SeeAlsoPageReference"].ToString().Replace("<", "<");
SeeAlsoPageRef = dt3.Rows[0]["SeeAlsoPageReference"].ToString().Replace(">", ">");
hyplnk_SeeAlso.Text = SeeAlsoPageRef;
}
with the above code it shows both the value but with 1 link.
i want when i retreive this value from database like:
ef35988c-9a70-493d-a98a-0320989b1a42
9487fe04-01e0-02cd-079f-c6be42224537
and both act as a different hyperlink, so when i click on the 1st link it goes a/c to that link,
and when i click on the second link it goes on another link.
db column may contain more than 2 values.
this is my first post in code project. please tell how i do this.