Community Page
- john-sheehan.com/blog Jump to website »
-
Subscribe -
Community
-
Top Commenters
-
Popular Threads
-
Recent Comments
- Hey John, congratulations -- and, you're welcome!
- How would you set this up to use multiple domains on the server in different iis sites?
- Alternatively, a small change made Wordpress'e original htaccess file if you can use: RewriteCond %{HTTP_HOST} !^(tuncay\.kinali\.net) [NC] RewriteCond %{HTTP_HOST} !^$ RewriteRule ^/(.*)$...
- I also think a killer app for Twitter isn't out there yet, is TweetDeck the best positioned to complete this vision?
- Perhaps a upcoming Google Wave application will do what you want..
Just Sayin' More Words
A blog by John Sheehan
Iâve built a ton of ASP.NET web sites using WebForms. Unfortunately I donât have the luxury of rewriting them all using ASP.NET MVC so Iâm stuck dealing with INamingContainer and the resulting auto-generated HTML element IDs.
Here are all the ways I know of that people use ... Continue reading »
Here are all the ways I know of that people use ... Continue reading »
9 months ago
9 months ago
I do agree though, there are a few situations where something like "TextBox1" might happen more than once, such as multiple user controls on one page.
This is a brilliant solution John, thanks! I can't wait to try it.
9 months ago
I'd be fine with INamingContainer if it was limited to repeaters and such. It's master pages and user controls that cause the most problems for me.
9 months ago
FWIW, some time ago I updated the component you reference above and have an option to auto generate ALL clientIds on the object. As you mention the downside there is that it sends all those ids to the client when the page is loaded but you do end up with a single object with properties. (serverVars.txtNameId for example) without having to modify server code specifically to add controls. I've used this quite a bit and it works and is worth the overhead on all but really huge forms with tons of controls.
Ultimately though I've come to prefer marking up controls with pseudo classes rather than IDs. That makes it much easier:
$(".txtName").blah()
Still an extra step but an easy and also very explicit one.
9 months ago
9 months ago
What happens when you have two user controls on a page, each with a textbox1? These will be client-ized by msft as something like ctl01_textbox1 and ctl02_textbox1. Which textbox1 will your code select?
You could tell developers on large projects to communicate with one another and make sure their user controls absolutely never have nested controls with overlapping names, but ...
(BTW - great blog!)
9 months ago
8 months ago
Wish i had more time to actually offer a suggestion too, i dont think you need to extend jQuery to do what you want :¬)
8 months ago
7 months ago
Track back from http://webdevvote.com/Tips_And_Tricks/Custom_jQ...
5 months ago
I will continue to look into the situation myself and let you know if I find anything.
Thanks.
5 months ago
Instead of using:
jQuery.extend(
jQuery.expr[":"],
{
asp: "jQuery(a).attr('id').endsWith(m[3]);"
}
);
Use this instead:
jQuery.extend(
jQuery.expr[":"].asp = function(a,i,m) {
return jQuery(a).attr('id').endsWith(m[3]);
}
);
Hope this helps out
5 months ago
include this in any update I post.
5 months ago
jQuery.expr[":"].asp = function(a, i, m) {
return jQuery(a).attr('id') && jQuery(a).attr('id').endsWith(m[3]);
};
May perform slightly better if it is formed like this:
jQuery.expr[":"].asp = function(a, i, m) {
return (id = jQuery(a).attr('id')) && id.endsWith(m[3]);
};
Either way, it works fine in Internet Explorer now.
5 months ago
1 month ago
1 month ago
{
return element = $(type + "[id$=" + endPart + "]");
}
seemed to do the trick for me,
also using _ as leading in the endpart to avoid mismacthes.
1 week ago
http://jquery-howto.blogspot.com/2009/06/jquery...