G
Guest
Hi,
I use master pages for ensuring a consistent layout on my app.
I need to add client side functionality to my server controls. I do this in
page_load (server side) like this:
DropDownList1.Attributes.Add("onchange", "Test();");
I add a javascript function ("Test") to the page that changes the disabled
property of several server controls when DropDownList1 has changed. In an
ordinary aspx page (with no master) it is easy to figure out the ID of the
server controls (e.g. "Button1") but when a control is placed in a content
page, the ID becomes something like
"aspnetForm.ctl00_ContentPlaceHolder1_Button1". In what way is the ID
generated? Can I be sure that once the application is deployed, the ID will
be the same?
Thanks, Dorte
I use master pages for ensuring a consistent layout on my app.
I need to add client side functionality to my server controls. I do this in
page_load (server side) like this:
DropDownList1.Attributes.Add("onchange", "Test();");
I add a javascript function ("Test") to the page that changes the disabled
property of several server controls when DropDownList1 has changed. In an
ordinary aspx page (with no master) it is easy to figure out the ID of the
server controls (e.g. "Button1") but when a control is placed in a content
page, the ID becomes something like
"aspnetForm.ctl00_ContentPlaceHolder1_Button1". In what way is the ID
generated? Can I be sure that once the application is deployed, the ID will
be the same?
Thanks, Dorte