Aaron Li's Blog

Write it down before I forget

  Home  |   Contact  |   Syndication    |   Login
  30 Posts | 0 Stories | 21 Comments | 1 Trackbacks

News

Google

Archives

Other's Idea

Today, I tried to control a html link with a tag and a function (in c#) like the following,
   
    <a href="<%#GetTopLink(Eval(FN_URL).ToString())%>"><%#Eval(FN_NAME)%></a>

    protected string GetTopLink(string vUrl)
    {
        if (<true>)
            return vUrl;
        else
            return "javascript: window.open('" + vUrl + "','new'); void(0);";
    }
   
It doesn't seems it's a very smart way. A reminding to myself,

    <a href="http://www.microsoft.com" target="_blank">go</a>
    <a href="http://www.microsoft.com" target="_self">go</a>
    <a href="javascript: window.open('http://www.microsoft.com', '_blank'); void(0);">go</a>
posted on Monday, October 01, 2007 6:44 PM

Feedback

No comments posted yet.
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification: