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

Discussion in 'ASP .Net' started by =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=, Mar 10, 2006.

  1. 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
    =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=, Mar 10, 2006
    #1
    1. Advertising

  2. 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
    Yuan Ren[MSFT], Mar 10, 2006
    #2
    1. Advertising

  3. =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=

    Guest

    , Mar 12, 2006
    #3
  4. 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
    Yuan Ren[MSFT], Mar 12, 2006
    #4
  5. =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=, Mar 12, 2006
    #5
  6. 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
    Yuan Ren[MSFT], Mar 14, 2006
    #6
  7. 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
    >
    >
    =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=, Mar 14, 2006
    #7
  8. 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
    Yuan Ren[MSFT], Mar 15, 2006
    #8
  9. 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
    >
    >
    =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=, Mar 15, 2006
    #9
  10. 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
    Yuan Ren[MSFT], Mar 16, 2006
    #10
  11. Hi;

    No problem. The caret is the blinking vertical bar that shows where text you
    type will be inserted. When a web page comes up, it is generally in the first
    TextBox on the page.

    I would like it to be in the 3rd TextBox on one page I have. How do I set it
    there? If the <form ...> tag was not in the master page I could do <form
    defaultfocus="textBoxID' ...>. But with the <form...> in the master page,
    that is not an option.

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



    ""Yuan Ren[MSFT]"" wrote:

    > 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
    >
    >
    =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=, Mar 16, 2006
    #11
  12. Hi Dave,

    Thanks for posting!

    I understand the issue. I have performed the test. Unfortunately, I think
    the current issue is a product limitation. Your scenario is different with
    other communicators'. The lifecycle of master page is earlier than the
    content, so that we can not set the property dynamically. If we do this,
    the reference can not be found at rendering time. And we will encounter the
    error. However, I think the current idea is very useful and appreciated.
    Please don't hesitate to submit your feedback to Microsoft. Thanks!

    Regards,

    Yuan Ren [MSFT]
    Microsoft Online Support
    Yuan Ren[MSFT], Mar 17, 2006
    #12
  13. bummer - ok - thanks

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



    ""Yuan Ren[MSFT]"" wrote:

    > Hi Dave,
    >
    > Thanks for posting!
    >
    > I understand the issue. I have performed the test. Unfortunately, I think
    > the current issue is a product limitation. Your scenario is different with
    > other communicators'. The lifecycle of master page is earlier than the
    > content, so that we can not set the property dynamically. If we do this,
    > the reference can not be found at rendering time. And we will encounter the
    > error. However, I think the current idea is very useful and appreciated.
    > Please don't hesitate to submit your feedback to Microsoft. Thanks!
    >
    > Regards,
    >
    > Yuan Ren [MSFT]
    > Microsoft Online Support
    >
    >
    =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=, Mar 17, 2006
    #13
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mark Olbert

    Master Page Button and Detail Page Button

    Mark Olbert, Jan 30, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    621
    Mark Olbert
    Feb 3, 2006
  2. Dev
    Replies:
    1
    Views:
    1,662
    =?Utf-8?B?Y2xpY2tvbg==?=
    Mar 22, 2006
  3. Doug McCann
    Replies:
    1
    Views:
    1,005
    William Brogden
    Aug 5, 2004
  4. Aussie Rules
    Replies:
    5
    Views:
    5,269
    Walter Wang [MSFT]
    Jul 25, 2006
  5. Nathan Sokalski
    Replies:
    25
    Views:
    1,426
    Nathan Sokalski
    Mar 4, 2010
Loading...

Share This Page