M
MikeD
Hello,
I wish to use a Hyperlink control within a repeater but am having trouble
forming the tag. The NavigateURL part is causing the most trouble. I wish to
form a link of the format article.aspx?ArticleNum=2 with the actual number
being pulled from a dataset. Here's what I have so far:
<asp:Hyperlink id="hypTitle" runat="server" NavigateUrl='<%#
"article.aspx?ArticleNum=" + DataBinder.Eval(Container.DataItem, "ID")%>'>
<%# DataBinder.Eval(Container.DataItem,"strTitle")%>
</asp:Hyperlink>
If I remove the text string from the NavigateURL element then the page will
display, but with it it it errors stating "System.FormatException: Input
string was not in a correct format.". It seems to be trying to convert the
string element to a double type according to the stack trace.
Is there an obvoius problem with my code or a better way of doing this?
Any thoughts appreciated.
<M>ike
I wish to use a Hyperlink control within a repeater but am having trouble
forming the tag. The NavigateURL part is causing the most trouble. I wish to
form a link of the format article.aspx?ArticleNum=2 with the actual number
being pulled from a dataset. Here's what I have so far:
<asp:Hyperlink id="hypTitle" runat="server" NavigateUrl='<%#
"article.aspx?ArticleNum=" + DataBinder.Eval(Container.DataItem, "ID")%>'>
<%# DataBinder.Eval(Container.DataItem,"strTitle")%>
</asp:Hyperlink>
If I remove the text string from the NavigateURL element then the page will
display, but with it it it errors stating "System.FormatException: Input
string was not in a correct format.". It seems to be trying to convert the
string element to a double type according to the stack trace.
Is there an obvoius problem with my code or a better way of doing this?
Any thoughts appreciated.
<M>ike