This Blog Has Been Moved !

This Blog Has been moved to http://aleemkhan.wordpress.com

I don’t remember how many times I have written this, nearly for every ASP.NET project I have to write this, so I am posting so I can get it back. It is a simple method of the getting the control with the server side id. ASP.NET changes the Id’s of nested server side controls when page is rendered.

This function simply compares the last part of the control id with the server side id of the control (passed as parameter)

function findObjWithClientId(Id)

{

var ctrls = document.all;

for(var count = 0; count < ctrls.length ; count ++)

{

var index = ctrls[count].id.indexOf(Id);

if(index != -1)

{

if((ctrls[count].id.length - index) == Id.length)

{

return ctrls[count];

}

}

}

return null;

}

Comments

2 comments have been posted.
Anonymous Anonymous
Posted @ 5:47 AM
uh.. bookmarked thread ))
 

Anonymous Anonymous
Posted @ 12:50 PM
Howdy,

When ever I surf on web I come to this website[url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips].[/url]abdulaleemkhan.blogspot.com is filled with quality info. Do you pay attention towards your health?. In plain english I must warn you that, you are not serious about your health. Recent Scientific Research displays that about 90% of all United States adults are either chubby or overweight[url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips].[/url] So if you're one of these citizens, you're not alone. Infact many among us need to lose 10 to 20 lbs once in a while to get sexy and perfect six pack abs. Now the question is how you are planning to have quick weight loss? You can easily lose with with little effort. You need to improve some of you daily habbits to achive weight loss in short span of time.

About me: I am writer of [url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips]Quick weight loss tips[/url]. I am also health trainer who can help you lose weight quickly. If you do not want to go under hard training program than you may also try [url=http://www.weightrapidloss.com/acai-berry-for-quick-weight-loss]Acai Berry[/url] or [url=http://www.weightrapidloss.com/colon-cleanse-for-weight-loss]Colon Cleansing[/url] for effective weight loss.