Logo 
Search:

Asp.net Answers

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds
  Question Asked By: Doan Tran   on Apr 07 In Asp.net Category.

  
Question Answered By: Tamara Nguyen   on Apr 07

You can accomplish this by adding an attribute to your DropDownList.
This will add a Javascript event handler to your rendered HTML and
allow you to easily open  a new window:

In the Page_Load event add this code


DropDownList1.Attributes.Add("onchange", "window.open
('TestPage.aspx','myNewWindow','height=200,width=400,status=yes,toolbar=no,menu
bar=no,location=no'))";

When your page is loaded this attribute will be added to the
DropDownList tag and when you click a new item in the list
the window  will open.

Share: 

 

This Question has 3 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Opening a new Window from ASP.NET code-behind Or get search suggestion and latest updates.


Tagged: