My Stuff
  •   Blog Index
  •   Blog History
  •   Today's Posts
  •   Greg on Politics
  •   Search Term Q&A
  •   QotDs
  •   Popular Articles
  •   Most Active
  •   Recent Comments
  •   Articles With Images
  •   Newbie Competition
  •   Gun Control Questionnaire
  •   Florida Gun Resources
  •   [ contact ]
  • Bloggers I've Met
  •   Gun Nuts Media
  •   MArooned
  •   McThag
  •   Robb "No Pants" Allen
  •   Say Uncle
  •   The Big Guy
  • Friends
  •   Another Manic Monday
  •   Cato Institute
  •   My Tampa Life
  •   Sticks of Fire
  •   Tampa BLAB
  •   Tampa Bay Fish
  •   The Line is Here
  •   WMITC
  • Blogs
  •   2A Musings
  •   Advanced Armament Corp
  •   Airborne Combat Engineer
  •   Alphecca
  •   Anarchangel
  •   Another Gun Blog
  •   Argghhh!!!
  •   Arizona Rifleman
  •   Armed Canadian
  •   Atomic Nerds
  •   Bayou Renaissance Man
  •   Billlls Idle Mind
  •   Black Man With A Gun
  •   Blunt Object
  •   Bore Patch
  •   Cam Edwards
  •   Captain of a Crew of One
  •   Cat O. Nine Tales
  •   Cogito Ergo Geek
  •   Colt CCO
  •   DiveMedic
  •   Firearms and Freedom
  •   From the Barrel of a Gun
  •   GeekWithA.45
  •   Geeks With Guns
  •   Great Blue Whale
  •   Gun Loving John
  •   Gun Pundit
  •   Gun Trust Lawyer
  •   GunBloggers
  •   Gunpowder Treason
  •   Guns, Holsters and Gear
  •   Hell in a Handbasket
  •   Home on the Range
  •   I don't sleep, I dream
  •   John Lott
  •   Jon H. Gutmacher
  •   Justin Buist
  •   Keep and Bear Arms
  •   Keyboard and a .45
  •   LawDog Files
  •   Liberty Girl
  •   Liberty News
  •   Liberty Zone
  •   Mad Rocket Scientist
  •   Michael Bane
  •   Michael's Soapbox
  •   Move Left?
  •   Mr. Completely
  •   NRA Blog
  •   New Jovian Thunderbolt
  •   Ninth Stage
  •   No Looking Backwards
  •   Of Arms & the Law
  •   Pretty Pistolera
  •   Right to Bear Arms
  •   Rustmeister's Alehouse
  •   Sentinel
  •   Shooting the Messenger
  •   Smallest Minority
  •   Snowflakes In Hell
  •   Somewhat Intelligent
  •   Steve's Blog
  •   TFS Magnum
  •   Tell Me Why?
  •   The Bitch Girls
  •   The Breda Fallacy
  •   The Countertop Chronicles
  •   The Firearm Blog
  •   The Gun Blogs
  •   The Liberty Sphere
  •   The Mad Hatter
  •   The Real Gun Guys
  •   The Shootist
  •   The Whited Sepulchre
  •   Trigger Finger
  •   View From NC Idaho
  •   View From The Porch
  •   Volokh Conspiracy
  •   Wasted Electrons
  • 2A/Firearm Info
  •   Florida Firearms Law
  •   Gun Facts
  •   Gun Law News
  •   Gun Laws
  •   GunBlast
  •   GunCite
  •   Handgun Law
  •   NRA News
  •   USA Carry
  •   Wiki Entry

  • Previous Entries
      2015
        Sep
      2012
        May
        Apr
        Mar
        Feb
      2011
        Dec
        Nov
        Oct
        Aug
        Jul
        Jun
        May
        Apr
        Mar
        Feb
        Jan
      2010
        Dec
        Nov
        Oct
        Sep
        Aug
        Jul
        Jun
        May
        Apr
        Mar
        Feb
        Jan
      2009
        Dec
        Nov
        Oct
        Sep
        Aug
        Jul
        Jun
        May
        Apr
        Mar
        Feb
        Jan
      2008
        Dec
        Nov
        Oct
        Sep
        Aug
        Jul
        Jun
        May
        Apr
        Mar
        Feb
        Jan
      2007
        Dec
        Nov
        Oct
        Sep
        Aug
        Jul
        Jun
        May
        Apr
        Mar
        Feb
        Jan
      2006
        Dec
        Nov
        Oct
        Sep
        Aug
        Jul
        Jun
        May
        Apr
        Mar
      2005
        Dec
        Nov
        Oct
        Sep
        Aug
        Jul
        Jun
        May
        Apr
        Feb
        Jan
      2004
        Dec
        Nov
        Oct
        Sep
        Aug
        Jul
        Jun
        May
        Apr
        Mar
        Feb
        Jan
      2003
        Dec
        Nov
        Oct
        Sep
         

    Greg and Beth

    the political and personal musings of two
    mountaineers living in west-central Florida
     
    JQuery and ASP.Net Comment
    Gregory Morris, 3/30/09 7:36:23 am
    JQuery is some cool stuff. And it works nicely alongside ASP.Net. It even augments ASP.Net AJAX nicely, which is why Microsoft has gotten really friendly with the JQuery folks.

    One thing I've noticed, however, is when you use JQuery in conjunction with ASP.Net, your selectors need to find the DOM elements using their CSS class, because .NET takes over the control's ID when you specify "runat=server".

    I think there is a way to make JQuery find all elements whose ID matches a basic pattern, but if you don't get full regex support, it won't be very robust. The only problem with using an element's CSS class in the selector is that you end up with a ton of CSS classes for all of the individual elements you want to do stuff to.


    [Comments are closed after a month.]

    Re: JQuery and ASP.Net
    Leo, 3/30/09 9:36:45 am
    Agreed that this is a major PITA when working with ASP.NET.
    I actually found this behavior of changing IDs to make it almost unusable. To get around this "feature", I would just spit out something to the page using an asp:Literal and then wrap that literal with some span or div so I could control it form the javascript.

    Hope this helps.
    -=Leo
    Re: JQuery and ASP.Net
    Gregory Morris, 3/30/09 9:40:21 am
    I don't normally mind how ASP fubars the ID, because it makes working on the server side much nicer.

    JQuery selector syntax allows for things like this:
    $("input[id][id$='TextBox1']")

    The $= means "ends with". So as long as you are somewhat intelligent about naming your controls, you can use that to and it'll work fine.

    Of course, as I mentioned in the post, using the CSS class in the selector works just as well, even if it is a bit uglier.
    < "Militias and Missouri"
    "West Virginia Reciprocity Update" >


    Older entries
    Blog RSS - Blog Comments RSS

    © 2008 Gregory Morris
    Notice: There are some areas of this website where everyone is permitted to post information. (In this case, information is defined as anything you can paste/type into an html form.) Do not post anything that cannot be legally put in the public domain. I have the absolute power to remove/modify/edit anything that is posted on this site. All original content on this website is owned solely by me, and cannot be redistributed without prior written consent. All information on this website is provided with absolutely no warranty. [Privacy Policy]
    Click Here for information about a
    FREE introduction to firearms
    safety and shooting.

    Answers to the
    Gun Control Questionnaire:
    Since this questionnaire began:
  • 'A' was selected 10916 times.
  • 'B' was selected 15302 times.
  • 'C' was selected 2741 times.
  • 'D' was selected 101235 times.


  • Search:



    Join The NRA!


    Second Amendment Foundation


    Ammo deals at Sportsman's Guide


    blab135x75.gif



    [287462]