Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > in master page, setting default button

Reply
Thread Tools

in master page, setting default button

 
 
Dev
Guest
Posts: n/a
 
      03-22-2006
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

 
Reply With Quote
 
 
 
 
=?Utf-8?B?Y2xpY2tvbg==?=
Guest
Posts: n/a
 
      03-22-2006
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.



"Dev" wrote:

> 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
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting the value of a Master page's control's property using a property of the Master page Nathan Sokalski ASP .Net 25 03-04-2010 03:42 AM
default button in content section with master pages Keith G Hicks ASP .Net 0 04-10-2008 02:09 AM
2.0 Master Page Default Button =?Utf-8?B?Q2hyaWlz?= ASP .Net 3 03-16-2007 10:20 AM
<form> in master page, setting default button and 1st control =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?= ASP .Net 12 03-17-2006 05:01 PM
seeking servlet "Master" keep getting "Master/servlet/Master" not found. Tomcat 5.0.25 Doug McCann Java 1 08-05-2004 09:16 PM



Advertisments