Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Hyperlink template problem

0 views
Skip to first unread message

Mick

unread,
Aug 12, 2008, 10:43:19 AM8/12/08
to
Hi, I'm having a problem with passing two parameters via a hyperlink
template.

here is my code

<asp:TemplateField>

<ItemTemplate>

<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%#
iif(eval("Type") = "Agency", Eval("ID", "Agency.aspx?agencynum={0}"),
Eval("ID", "Contact.aspx?contacttype=Agen&contactnum={0}")) %>' Text='<%
#Eval("Name") %>'></asp:HyperLink>

</ItemTemplate>

</asp:TemplateField>

i need the following part:

Contact.aspx?contacttype=Agen&contactnum={0}

to be like this

Contact.aspx?contacttype=Agen&contactnum={0}&companynum={1}

but when i run it i get the following error.

"Index (zero based) must be greater than or equal to zero and less than the
size of the argument list."

how can I get this to work?

Thanks

Mick


0 new messages