0

I am currently trying to send 2 parameters through an URL in ASP.NET. I have been able to successfully send across 1 parameter. I am now wanting to learn how to send 2 across.

I am wanting to also send another ID as well that links to Favourite_ID similar to what is happening below with Recipe_ID

ASP.NET

<asp:HyperLink Runat ="server" NavigateUrl ='<%#"RecipePage?id=" + DataBinder.Eval(Container.DataItem, "Recipe_ID").ToString()%>' ID="Hyperlink1"><%#DataBinder.Eval(Container.DataItem, "Recipe_Name")%></asp:HyperLink></asp>
2

2 Answers 2

1
<asp:HyperLink Runat ="server" NavigateUrl ='<%#"RecipePage?id=" + DataBinder.Eval(Container.DataItem, "Recipe_ID").ToString()+"&YourId="+DataBinder.Eval(Container.DataItem, "YourId")%>' ID="Hyperlink1"><%#DataBinder.Eval(Container.DataItem, "Recipe_Name")%></asp:HyperLink></asp>

You can place you id name in place of YourId and can add multiple ids like above

Sign up to request clarification or add additional context in comments.

Comments

0
<asp:hyperlink
runat="server"
id="hlReceipt"
navigateurl='<%# String.Format("RecipePage.aspx?id={0}&name={1}", Eval("Receipt_ID"), Eval("Receipt_Name")) %>'
text='<%# Eval("Receipt_title") %>'>
</asp:hyperlink>

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.