little question , hope some 1 can help me here

Discussion in 'Programming' started by greekhand, Oct 21, 2007.

  1. #1
    i just building new website using asp.net , and im using some Url-ReWriting
    technique .

    i need to deliver response-url accordingly to the request-url ...

    i got 2 ways in mind , please help me decide which is better :

    1) just using DataTable with 2 fields , request and response ..... and to deliver the response base on request

    2)to create ReUrl.cs file with ArrayList and store there all the response/request data , when i need to get the response-url i will do something like that ..

    ReUrl ru = new ReUrl();

    string rUrl = ru.GetUrl(requestedUrl);

    Context.PathReWrite(rUrl ,false);


    hope you will understand my english :D



    thanks alot
     
    greekhand, Oct 21, 2007 IP
  2. Alexander the Great

    Alexander the Great Peon

    Messages:
    253
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Use a hashtable and an XML file.

    This might help you on url rewriting for asp.net? Not sure whether you got that part solved or not?
     
    Alexander the Great, Oct 22, 2007 IP
  3. greekhand

    greekhand Active Member

    Messages:
    249
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #3
    i saw this post before , and yes i got that part solved ...

    thanks .
     
    greekhand, Oct 22, 2007 IP
  4. Alexander the Great

    Alexander the Great Peon

    Messages:
    253
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #4
    OK then all you need is a hashtable, which is a very fast key value pair. It works very much like an arraylist, except that instead of referring to item 3, you would refer to item "3" in this case. The difference being a string versus an integer. It doesn't have to be a string, it could be a uri, but you can fit a url into a string, then look up its corresponding url to 301 to.

    A hashtable is much faster than a datatable.
     
    Alexander the Great, Oct 22, 2007 IP
  5. greekhand

    greekhand Active Member

    Messages:
    249
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #5
    i never used hashtable , i will google it and check it sounds really good
    idea , ty very very very much , for your time .
     
    greekhand, Oct 23, 2007 IP