title: hyperlink in new window c#
body: <p>I have a variable with hyper links (www.wow.com) like this. I have to pass this value to <code>&lt;a href=""&gt;</code> here in this href tag. My real task is to open this hyper links which will change time by time in my variable, in new tabs. For that I have used javascript in my asp.net web application with c#.</p>
  
  <p>I have used window.location function in js, but its not working correctly. Does any one have an idea to open that hyper links in new window or tabs.</p>
  
  <p>The hyper link value should change as per that variable and should open in new tabs. Can anyone help me to do this</p>
  
  <p>below is a code snippet from my actual code</p>
  
  <pre><code>&lt;td class="emails-table-cell" colspan="2"&gt;
          &lt;asp:Literal ID="BodyLiteral" runat="server" /&gt;
          &lt;%
              // *** Write to file ***
  
              // Specify file, instructions, and privelegdes
              FileStream file = new FileStream("test.html", FileMode.OpenOrCreate, FileAccess.Write);
  
              // Create a new stream to write to the file
              StreamWriter sw = new StreamWriter(file);
  
              // Write a string to the file
              sw.Write(BodyLiteral.Text);
  
              // Close StreamWriter
              sw.Close();
  
              // Close file
              file.Close();
  
              var text = File.ReadAllText(@"d:\test.html");
  
              Regex regex = new Regex("href\\s*=\\s*\"([^\"]*)\"", RegexOptions.IgnoreCase);
              MatchCollection matches = regex.Matches(text);
              //Response.Write(matches);
              foreach (Match match in matches)
              {
                  Response.Write(match.Groups[1]);                    
                  %&gt;
  &lt;%
              }
  %&gt;
  </code></pre>
  
  <p>I'm getting this from my email that is gmail. I have accessed my gmail through my web application. Then I have accessed my mail contents. From that mail contents I have to fetch hyperlinks and show all the links in separate tabs that is the output i'm looking for.</p>