Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > <form> in master page, setting default button and 1st control

Reply
Thread Tools

<form> in master page, setting default button and 1st control

 
 
=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=
Guest
Posts: n/a
 
      03-10-2006
Hi;

I have my <form> in the master page because the master page includes the
menu for all pages. But I would like to set the default button and control to
place the caret in for each page. Is there a way to do this? (My
understanding is this has to be done in the form tag.)

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

 
Reply With Quote
 
 
 
 
Yuan Ren[MSFT]
Guest
Posts: n/a
 
      03-10-2006
Hi Dave,

Thanks for posting!

After performing a test, I think the current issue is not easy to
implement. The default button can not be set on the master page when the
button is a portion of the content page. The InvalidOperationException will
be thrown at compilation time if we perform this. Please submit your
feedback by accessing the link below for the current issue:
http://lab.msdn.microsoft.com/ProductFeedback/

Your idea will be appreciated!

Thanks for your understanding.

Regards,

Yuan Ren [MSFT]
Microsoft Online Support

 
Reply With Quote
 
 
 
 
webmaster@ukadultchat.co.uk
Guest
Posts: n/a
 
      03-12-2006
I found a solution to this problem here:

http://groups.google.co.uk/group/mic...49680ceb5dc388

 
Reply With Quote
 
Yuan Ren[MSFT]
Guest
Posts: n/a
 
      03-12-2006
Hi,

Your idea is appreciated! I forget we can use the default button in the
Panel control. Thanks for reminder!

Regards,

Yuan Ren [MSFT]
Microsoft Online Support

 
Reply With Quote
 
=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=
Guest
Posts: n/a
 
      03-12-2006
Or some simpler code for Page_Load (just tried this from your idea):

Page.Form.DefaultButton = btnSave.UniqueID;

Still doesn't solve the set caret to a specific control though...

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com



"(E-Mail Removed)" wrote:

> I found a solution to this problem here:
>
> http://groups.google.co.uk/group/mic...49680ceb5dc388
>
>

 
Reply With Quote
 
Yuan Ren[MSFT]
Guest
Posts: n/a
 
      03-14-2006
Hi Dave,

Thanks for your reply!

Could you please tell me which specific control is used? If the control is
a naming control, I suggest you use the findcontrol method to get the
reference of it.

Regards,

Yuan Ren [MSFT]
Microsoft Online Support

 
Reply With Quote
 
=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=
Guest
Posts: n/a
 
      03-14-2006
It's a button and it's ID (and therefore variable in the code behind) is
btnSave.

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com



""Yuan Ren[MSFT]"" wrote:

> Hi Dave,
>
> Thanks for your reply!
>
> Could you please tell me which specific control is used? If the control is
> a naming control, I suggest you use the findcontrol method to get the
> reference of it.
>
> Regards,
>
> Yuan Ren [MSFT]
> Microsoft Online Support
>
>

 
Reply With Quote
 
Yuan Ren[MSFT]
Guest
Posts: n/a
 
      03-15-2006
Hi Dave,

Thanks for your reply!

Please use the findcontrol method to instead of uniqueID and try again to
figure out whether the problem still occurs.

Regards,

Yuan Ren [MSFT]
Microsoft Online Support

 
Reply With Quote
 
=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=
Guest
Posts: n/a
 
      03-15-2006
Hi;

Page.Form.DefaultButton = btnSave.UniqueID;

works fine to set the default button. Why should I use find control instead?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com



""Yuan Ren[MSFT]"" wrote:

> Hi Dave,
>
> Thanks for your reply!
>
> Please use the findcontrol method to instead of uniqueID and try again to
> figure out whether the problem still occurs.
>
> Regards,
>
> Yuan Ren [MSFT]
> Microsoft Online Support
>
>

 
Reply With Quote
 
Yuan Ren[MSFT]
Guest
Posts: n/a
 
      03-16-2006
Hi Dave,

Sorry for misunderstanding!

I'm confused about "Still doesn't solve the set caret to a specific control
though..." which you mentioned before. Could you please give me more detail
explanation? Thanks.

Regards,

Yuan Ren [MSFT]
Microsoft Online Support

 
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
peterborough uk shortage of 1st 1st line jobs gerry MCSE 91 03-12-2008 06:03 PM
in master page, setting default button Dev ASP .Net 1 03-22-2006 02:59 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
Setting default button on dynamically loaded Web User Control Ben Fidge ASP .Net 2 07-26-2004 11:49 AM



Advertisments