Dopo tanto penare ho trovato la soluzione!!
codice:
private void ListBox1_SelectedIndexChanged(object sender, System.EventArgs e)
{
if(this.ListBox1.SelectedValue.EndsWith("htm"))
{
string address = @SaveLocationURL+GetFileName2(this.ListBox1.SelectedValue.ToString());
string scriptString = string.Format(@"<script language=""javascript"" type=""text/javascript"">window.open(""{0}"", ""_blank"", """");</script>", address);
this.RegisterStartupScript("scriptString", scriptString);
}
else
{
this.Preview_Image.ImageUrl=SaveLocationURL+hif[this.ListBox1.SelectedIndex];
}
}