Passing in extra parameters in a URL
- by Scott Atkinson
I have the below column on my table what gets binded on pageload, the parameters in there work fine but i need to add an additional parameter which is the fullname which is the next column along but im having trouble figuring our the syntax,
here is my ASP
<asp:TemplateField HeaderText="ID">
<ItemTemplate>
<asp:HyperLink ID="hyperLeadID" runat="server" NavigateUrl='<%#Eval("ID","/documents/Q-Sheet.aspx?LeadID={0}&isHappyCallReferral=yes&isHappyName={1}") %>'
Text='<%#Eval("ID")%>'></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Referral Name">
<ItemTemplate>
<asp:Label ID="lblRefName" CssClass="gvItem" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Name") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
As you can see at the end of ID column i have added isHappyName={1} which i assumed it would select the next column along as it starts at 0 but it keeps throwing an error which is
"Index (zero based) must be greater than or equal to zero and less than the size of the argument list."
Can someone help me to pass the usersname through the URL
Thanks