Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 use 2 parameters in hyperlink

Author  Topic 

joanne
Starting Member

46 Posts

Posted - 2005-12-18 : 08:30:14
Hi,

How to change my code to send 2 parameters in the prodpage?
This is may code for just one value:

Function MakeURL(ByVal strURL As String) As String
Return "prodpage.aspx?sName=" & strURL
End Function

<asp:HyperLink Runat=server NavigateUrl='<%# MakeURL(DataBinder.Eval(Container.DataItem,"sName"))%>' ID="Hyperlink1">
<%#DataBinder.Eval(Container.DataItem,"sName")%>
</asp:HyperLink>


Thanks a lot

tracymckibben
Starting Member

1 Post

Posted - 2005-12-20 : 14:30:21
Simple. Your function needs to look something like this:

Function MakeURL(ByVal strURL As String, ByVal strURL2 As String) As String

Return "prodpage.aspx?sName=" & strURL & "&sName2=" + strURL2

End Function

Then in your call to MakeURL, just pass it a second parameter. This is untested code and may not run exactly as-is, but it's the general idea.

========================
Tracy McKibben
MCSE, MCDBA
tracy.mckibben@gmail.com
========================
Go to Top of Page
   

- Advertisement -