473,398 Members | 2,525 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

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

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

Mar 10 '06 #1
12 4547
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

Mar 10 '06 #2
I found a solution to this problem here:

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

Mar 12 '06 #3
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

Mar 12 '06 #4
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

"we*******@ukadultchat.co.uk" wrote:
I found a solution to this problem here:

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

Mar 12 '06 #5
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

Mar 14 '06 #6
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

Mar 14 '06 #7
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

Mar 15 '06 #8
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

Mar 15 '06 #9
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

Mar 16 '06 #10
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

Mar 16 '06 #11
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

Mar 17 '06 #12
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

Mar 17 '06 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Don | last post by:
Hi all, Is there some way in a <form> tag to transfer control to a JavaScript function after completion of the submit, where the <form> and function are on the same page? I believe ONSUBMIT and...
3
by: Ben | last post by:
Here's my form: <form name="aForm" method='post'> <input type=file name=file1 onkeypress='KeyPress()'><br> <a id='attachMoreLink' href='javascript:AddFileInput()">Attach More Files </a> <input...
6
by: snacktime | last post by:
I've searched and searched and have not found a solution to suppress the margin on form or href tags so that there is no space before or after the tag. The only way I have found to do this is to...
1
by: Quentin Huo | last post by:
Hi: There can be only one <form> control in one page. So generally the user controls should not include the <form> control. I created a user control which is used to edit the book's...
3
by: Lakshmi Narayanan.R | last post by:
Hi Experts MasterPage.master In this master page, no <form> tag is used. Register.aspx Here also no <form> tag. But the form elements are working fine inside the <asp:content> tag Is it Ok...
1
by: Dariusz Tomon | last post by:
Hi In my project I have got several webcontrol (ascx). How can I handle with the problem: I would like to have some ASPNET object (DropDownList, InputBox etc.) in one webcontrol (this...
2
by: Shawn H | last post by:
Hi guys, I'm experiencing this really strange issue with a HTML form, because no data gets posted. Basically, everything is written in ASP. Firstly, a user fills in an online (ASP) form, and...
19
by: Coward 9 | last post by:
HI, I saw in an example hello.aspx, there is a <form tagbeing used like <form runat="server> I search all html tag references and could NOT find "runat" attributes for <formtag. which...
2
by: daveh551 | last post by:
I'm a little confused about something. I have a "Contact Us" page that I'm developing that runs within a content page under a master page. I was plagiarizing fairly liberally from some other...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.