My ASP is rusty (well, this is the SQL forum, not the ASP forum!) but I think the answer is something like:
<%dim namecompany
namecompany=request.querystring("stockname")
response.redirect "portfolio.asp?stockname=" & namecompany
%>
I'll move this post to the correct forum so someone else can check my answer...