Reputation: 1294
I have dropdownlist with previous date vlaues to open the url with selected value.When i select the value from dropdown it open the url in new window and when i refresh the page it reopen the same url.I want open to open the url in new tab and prevent to reopen the url on refresh My code is bellow
ClientScript.RegisterStartupScript(Me.GetType(), "openfile", String.Format("var w = window.open('http://appsrv01.shakarganj.com.pk:7778/reports/rwservlet?reptest&report=eth_fleet_dtl&veh_num={0}','_newtab');", DropDownList1.SelectedValue), True)
Upvotes: 1
Views: 635
Reputation:
If you provide name and replace flag to the window (in window.open method), it won't open the same URL in the other window. You can refer this.
Upvotes: 4
Reputation: 13018
You can use window.open method with return false on selected index change event.
Upvotes: 0