SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Dec 2003
    Location
    Ireland
    Posts
    116
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Asp.Net - Problem creating a link to hash-tag on Twitter

    Hi all,

    I need to create some links to the Twitter search page.

    In my first example 'link1', that works fine, when you click the link you go to the twitter search results for 'wc2010'.

    However, in my second link I want to search for the hashtag+wx2010, which is how data is related/grouped on Twitter. My second link always just redirects to a user called 'wc20210' which is not what I want. How can I create a link to a hashtagged word on Twitter?

    string link1 = "<a href='http://www.twitter.com/search?q=wc2010'>Link 1 to Twitter</a>";
    string link2 = "<a href='http://www.twitter.com/search?q=#wc2010'>Link 2 to Twitter</a>";

    Response.Write(link1.ToString() + "<p>");
    Response.Write(link2.ToString());

    Regards

    Melt

  2. #2
    SitePoint Guru Jason__C's Avatar
    Join Date
    Oct 2009
    Location
    Racoon City
    Posts
    660
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Code HTML4Strict:
    string link2 = "<a href='http://www.twitter.com/search?#wc2010'>Link 2 to Twitter</a>";

  3. #3
    SitePoint Zealot
    Join Date
    Dec 2003
    Location
    Ireland
    Posts
    116
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi USPatriot,

    Sorry, that doesn't solve my problem, it only duplicates it.

    I'm trying to create a link to a hash-tagged word on Twitter. Your code causes Twitter to redirect to a user called wc2010, which is not what I'm looking for.

    Thanks for the reply.

    Regards
    Melt


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •