Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Response.Write(window.open STRING)

Status
Not open for further replies.

tqeonline

MIS
Oct 5, 2009
304
0
0
US
How can i make this work?

Code:
Dim url As String
            url = "[URL unfurl="true"]http://sqadashboard.int.asurion.com/Release_Status/Cycle_Information.aspx?id="[/URL] & relID & "&RelName=" & RelName
            Response.Write("<script>window.open'&url&','_blank');</script>");

On the click of a button I wont it to open that "URL" in another window.

- Matt

"If I must boast, I will boast of the things that show my weakness"

- Windows 2003 Server, 98 SE, XP
- VB.NET, VSTS 2010, ASP.NET, EXCEL VBA, ACCESS, SQL 2008
 
this doesn't work either
Code:
Response.Write("<script>window.open('" & url & "','_blank')</script>")

- Matt

"If I must boast, I will boast of the things that show my weakness"

- Windows 2003 Server, 98 SE, XP
- VB.NET, VSTS 2010, ASP.NET, EXCEL VBA, ACCESS, SQL 2008
 
since updatepanels don't like postbacks or "Response.writes"

i had to use this

Code:
Dim sb As StringBuilder = New StringBuilder("")
        sb.Append("window.open('" & url & "');")
        ScriptManager.RegisterClientScriptBlock(Me.UpdatePanel1, Me.UpdatePanel1.GetType(), "NewClientScript", sb.ToString(), True)

- Matt

"If I must boast, I will boast of the things that show my weakness"

- Windows 2003 Server, 98 SE, XP
- VB.NET, VSTS 2010, ASP.NET, EXCEL VBA, ACCESS, SQL 2008
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top