Open a page in asp.net

How can I pass my value to below link to open a page?

 Public Class MyLink
        Inherits HyperLink
        Public Sub New(ByVal text As String, ByVal values As String)
            MyBase.New()
            Me.Text = text
            NavigateUrl = "window.open( 'http://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=<%# '" & myvalue & "' %>','_blank' ,'status=yes,menubar=no,toolbar=no,scrollbars=yes,resizable=yes,height=800,width=980,location=no' );"

        End Sub
    End Class
VBdotnet2005Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave BaldwinFixer of ProblemsCommented:
NavigateUrl = "window.open( 'http://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=<%# '" & myvalue & "' %>','_blank' ,'status=yes,menubar=no,toolbar=no,scrollbars=yes,resizable=yes,height=800,width=980,location=no' );"
That's javascript, not ASP.  While you can pass a value to it, it has to be placed in a javascript block on the page.  If you put it on the page where it will automatically open, it will probably be blocked by the browser's pop-up blocker.
VBdotnet2005Author Commented:
This page is for intranet only (inside the company).
VBdotnet2005Author Commented:
This works just fine. However, I just want it to pop up instead of open a new tab.

Public Class MyLink
        Inherits HyperLink
        Public Sub New(ByVal text As String)
            MyBase.New()
            Me.Text = text
            NavigateUrl = "https://www.google.ru/search?q=" & text

        End Sub
    End Class
OWASP: Forgery and Phishing

Learn the techniques to avoid forgery and phishing attacks and the types of attacks an application or network may face.

Dave BaldwinFixer of ProblemsCommented:
Doesn't change anything I said.  If the pop-up blocker is on, you won't see an 'automatic' pop-up because that is what they are designed to block.  Pop-ups that come up because the user clicked on something are allowed.  

And you still can't use a javascript 'window.open' in that statement.  Javascript only runs in the browser and that line is ASP that is run at the server.
VBdotnet2005Author Commented:
I just want to open a new page from my links. What would the javascript look like?
Dave BaldwinFixer of ProblemsCommented:
The javascript is what you put in your original code above.  But it has to be in the HTML page in a script section, not as part of the ASP code like you have it.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
VBdotnet2005Author Commented:
Thank you Dave
Dave BaldwinFixer of ProblemsCommented:
You're welcome, glad to help.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.