I never would have seen that except i caught it mentioned in a
presentation at DevConnections a few years back....

And heh, while doing a search right now for ".net client id", the
first hit on google was this Rick Strahl post
http://www.west-wind.com/WebLog/posts/4605.aspx   (see the first
comment there, it's Wilco pimping out his IDOverride control)



Supposedly there's stuff in the pipeline to specifically prevent .NET
from changing the IDs without any extra controls needed, coming in
"4.0", i cannot remember for the life of me where i read/saw that
though.....





On Dec 26, 11:09 am, Jeffrey <darkthr...@gmail.com> wrote:
> Thanks, MorningZ.
>
> IDOverride seems a good option.  I can't find too many discussions
> about Wilco's IDOverride from Internet.  Will the modifcation of
> ClientId impact the postback event raising?  I find of some warning
> about that. (LoadPostData, RaiseChangedEvent, IPostBackDataHandler
> issues)
>
> On 12月26日, 上午9時14分, MorningZ <morni...@gmail.com> wrote:
>
> > No offense.. but that doesn't seem to elegant or useful of a
> > solution...
>
> > if you have controls on a content page that are not in another
> > container (GridView, UserControl, etc etc), then Wilco Bawer's "ID
> > Override" is excellent....  one simple line of code keeps the ID of
> > <asp:TextBox id="TextBox1" />  as "TextBox1"
>
> >http://wilcob.com/Wilco/Toolbox/WilcoWeb.aspx
>
> > On Dec 25, 7:13 pm, Darkthread <darkthr...@gmail.com> wrote:
>
> > > When you use MasterPage in ASP.NET, the webcontrol's clientid will be
> > > added with prefix of its container.  TextBox1 will be rendered as
> > > <input name="ctl00$ContentPlaceHolder1$TextBox1" type="text"
> > > id="ctl00_ContentPlaceHolder1_TextBox1" />, the id becomes
> > > ctl00_ContentPlaceHolder1_TextBox1, but not TextBox1, so you can't
> > > simply use $("#TextBox1") to find it.
>
> > > Here is my idea to resolve this issue with $("._TextBox1") or $$
> > > ("#TextBox1") syntax, for your reference.
>
> > >http://blog.darkthread.net/blogs/darkthreadtw/archive/2008/12/26/reso...隱藏被引用文字
> > > -
>
> > - 顯示被引用文字 -

Reply via email to