in master page, setting default button

D

Dev

hi
i have master page in which i have form and now in content page i need
to set the defaultbutton. now i have one solution for that in content
page

"HtmlForm mainform = (HtmlForm)Master.FindControl("frmMain");
mainform.DefaultButton = btnSave.UniqueID;"
i have use this code that solve my problem

but now main problem is that i have around 500 page in which i have to
modify the page
can any body give me any idea hw can i solve this problem by adding
code in master page

Thanks in advance
Dev
 
G

Guest

You could calso expose the control as a property of the master page then
access it through Master.ControlName but i am not sure if that would be any
easier. If you are converting an existing site to using master pages i think
the only way to do it is to do a good old fashioned search and reaplce across
all your child pages.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top