1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Looking for .ASP Programming Help

Discussion in 'C#' started by coopersPick, Jan 22, 2011.

  1. #1
    Wanted to see how hard is it to display a good looking opt in for people to sign up for free picks with the field for their number being required where the system may be able to read the number and if it's not a valid 10 digit number than it defaults and makes them input the correct phone number.
     
    coopersPick, Jan 22, 2011 IP
  2. MuzD

    MuzD Peon

    Messages:
    167
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Are you looking to carry out server side validation. Have you though of client side validation using JS?
     
    MuzD, Jan 26, 2011 IP
  3. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Simply use a RegularExpressionValidator component and ensure that you do a serverside Page.IsValid check before proceeding to make sure people arent trying to bypass the clientside javascript checking.
     
    AstarothSolutions, Jan 26, 2011 IP
  4. coopersPick

    coopersPick Active Member

    Messages:
    528
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    55
    #4
    is it safe to have java script isnt that bad for seo?
     
    coopersPick, Jan 26, 2011 IP
  5. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Javascript is not bad for SEO unless you have mountains of it at the begining of the page or that it prevents navigation if javascript is turned off.

    When using .Net controls (or at least the out the box ones) 99% of the javascript is placed in external files and so cannot create the mounts of javascript and as the controls in question are validation on form submission it naturally isnt going to restrict site navigation.
     
    AstarothSolutions, Jan 27, 2011 IP
  6. longcall911

    longcall911 Peon

    Messages:
    1,672
    Likes Received:
    87
    Best Answers:
    0
    Trophy Points:
    0
    #6
    No, javascript is not bad for SEO.

    That is a myth that goes back to a time in the early 2000s when Google had a difficult time reading javascript. Sites using javascript navigation did not always get their internal links to pass PR. That issue is long gone, but statements about it linger still.
     
    longcall911, Jan 27, 2011 IP
  7. camjohnson95

    camjohnson95 Active Member

    Messages:
    737
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    60
    #7
    No it isn't hard.
    
    If IsNumeric(PhNum) And Len(PhNum) = 10 Then
    'valid
    Else
    'invalid
    End If
    
    Code (markup):
    Where PhNum is the variable that contains the phone number. I wouldn't bother with javascript validation unless you are expecting really heavy traffic.
     
    camjohnson95, Feb 1, 2011 IP
  8. MuzD

    MuzD Peon

    Messages:
    167
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Javascript isn't bad for SEO, However you shoudl try your best to make the journey of search engine spiders as pleasent as possible. Javascript canbe vital for a websites functionality, however if your javascript code goes into hundreds of lines. This means there are 100's of lines in between your keywords in the content & the header of the page. It is always best to use Unobtrusive JavaScript. Try searching for "Unobtrusive JavaScript" on google. Other members who have posted here are correct that Javascrtipt is not bad for SEO, but as a SEO consultant I always advise my clients to use Unobtrusive JavaScript.If you have any questions please feel free to ask.
     
    MuzD, Feb 2, 2011 IP