c# - how to open new window in new tab with dynamic url -
i have page drop down list , have open new window selected iteam's edit form
protected void dropdownlist1_selectedindexchanged(object sender, eventargs e) { this.entitygrid.columns.clear(); entityname.text = dropdownlist1.selecteditem.text; newentity.visible = true; newentity.text = dropdownlist1.selecteditem.text; ... } the following works
protected void newentity_click(object sender, eventargs e) { var entity = newentity.text; response.redirect(entity + "edit.aspx"); ... } but how can open in separate tab not new window.
open separate window client feature, need "inject" javascript tells browser this.
response.write( string.format( "<script>window.open('{0}','_blank');</script>", entity + "edit.aspx")); the parameter _blank tells windows.open function open new window
Comments
Post a Comment