aniruddha acharya

aniruddha acharya

  • NA
  • 94
  • 5.3k

How to Remove Tab Items from browser in Asp.Net

Jan 4 2017 12:35 PM

Hi To All,

But i want to remove each tab items from browser . click on another button .

i am using 2 button click methods.

1 button click event for Add tab items in browser.

<asp:Button ID="Button1" runat="server" Text="Open Browser" OnClick="Button1_Click" />


protected void Button1_Click(object sender, EventArgs e)
{
List<String> weblist = new List<string>();
weblist.Add("http://google.com");
weblist.Add("http://gmail.com");
weblist.Add("http://msdn.com");

for (int i = 0; i < weblist.Count; i++)
{
string item = weblist[i];
Process.Start(item);
}

}



2 button click event for Remove tab items in browser.

<asp:Button ID="Button2" runat="server" Text="Remove Browser" OnClick="Button2_Click" />

protected void Button2_Click(object sender, EventArgs e)
{

List<String> weblist = new List<string>();
weblist.Add("http://google.com");
weblist.Add("http://gmail.com");
weblist.Add("http://msdn.com");

for (int i = 0; i < weblist.Count; i++)
{
string item = weblist[i];
// Process.Start(item);

if (item == "http://msdn.com")
{
weblist.Remove(item);
}
}
}


How to Remove TabItems from browser .



Thanks,



Answers (2)