Change url link to city (plain text) RRS feed

  • Question

  • User-685183979 posted
    Hello there! Can someone tell me how to change the url field to plain text. I want to use that field so the user can type their city there instead of a url link. Or perhaps it woluld be cool to keep the url functon and forward the city name to a extern "find location page" like google maps :-) I also want to use swedish characters åäö in the city name.. Thanks!
    Friday, February 3, 2012 6:38 AM

All replies

  • User1950091109 posted

    What do you mean by URL field ?

    Saturday, February 4, 2012 4:10 AM
  • User-685183979 posted

    When you add a ad, in one of the textboxes you can write a link to a web page.

    I want that textbox to handle just plain text... So the user can put the name of their city instead of a link..


    And it would be nice to be able to use swedich characters åäö ÅÄÖ in the textbox aswell.

    Sorry for my bad english... I'm from Sweden Laughing




    Saturday, February 4, 2012 4:18 AM
  • User1950091109 posted

    Are you using asp.net

    Saturday, February 4, 2012 4:50 AM
  • User-685183979 posted

    Yes I use asp.net, VB



    Saturday, February 4, 2012 4:53 AM
  • User1950091109 posted

    Ok try make a custom validator 

    in which you will try this

    Regex urlregex = new Regex("(http(s)?://)?([\w-]+\.)+[\w-]+(/[\w- ;,./?%&=]*)?");
    String userText = "http://domain.com";
    Match m = urlregex.Match(s);
    if (!m.Success) {
    //Not a URL, Then make the IsValid = true;
     // Make the IsValid = false;

    Saturday, February 4, 2012 5:51 AM
  • User1950091109 posted

    This is for review how to create a custom validator


    Saturday, February 4, 2012 5:53 AM
  • User-685183979 posted




    I'll try that later today :)

    Saturday, February 4, 2012 6:07 AM