2.0 Master Page Default Button

G

Guest

How do you define the defaultbutton for a web page that has a master page
since the content page has no form tags to define the defaultbutton
attribute? Nothing I try seems to work.

Thanks for your help,
Chris
 
C

clintonG

We can put any controls we want to into ContentPlaceHolders but style is
defined in the .skin file and elsewhere.
Your question is vague but I think you might be talking about learning how
to use the SkinID attribute. Do some research on the use of this attribute
as it allows us to create various definitions in the .skin file for a
control that we may want to be disaplayed differently throughout the
application.

<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/
 
Joined
Jul 9, 2006
Messages
1
Reaction score
0
For anyone who stumbled across this post, here is another solution that may meet your needs.

You can use the panel control to define a default button for the page. However, the behavior is slightly less desirable. The user has to give the panel focus. Define the panel to expand across the entire content placeholder. If you have a control with embedded buttons (such as a gridview with edit/delete buttons) inside, you may want to turn the usesubmitbehavior to false on those fields.

<asp:Content ID="Content1" ContentPlaceHolderID="CPH" Runat="Server">
<asp: Panel ID="Panel1" runat="server" Width="100%" DefaultButton="Submit">
<!-- All the Pages Content -->
</asp: Panel>
</asp: Content>
 
Last edited:
Joined
Mar 16, 2007
Messages
1
Reaction score
0
I tried using the
<asp:Content ID="Content1" ContentPlaceHolderID="CPH" Runat="Server">
<asp: Panel ID="Panel1" runat="server" Width="100%" DefaultButton="Submit">
<!-- All the Pages Content -->
</asp: Panel>
</asp: Content>

but when I click inside a text box and hit enter I do not get my default button clicked.
 

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

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top