Andrew Siemer's Blog
Enterprise Web Applications, ASP.NET, C#, SQL Server, Architecture, & Writing
Blog Stats
Posts - 56
Articles - 0
Comments - 110
Trackbacks - 0
Home
Archives
Contact
Login
<< "...did you hear that man?..."
|
Home
|
LINQ to SQL - many to many relationships not supported! (yet?) >>
Setting a default button when using master pages
Its always the little things in life! This was pretty easy...once I found it that is.
this.Form.DefaultButton = this.ButtonControl.UniqueID.ToString();
Print
posted @ Monday, November 05, 2007 4:04 PM
Feedback
#
re: Setting a default button when using master pages
If you place your asp:Button in an asp:Panel you can set the defaultButton property of the panel to the button you desire.
This is especially handy on pages with multiple input "forms".
11/5/2007 5:32 PM |
Jason Whitehorn
#
re: Setting a default button when using master pages
But how change graphics and ser colour for the button? .. thanks
12/15/2007 5:54 AM |
Regali di Natale
#
re: Setting a default button when using master pages
You can set the color of the buttons in two primary ways...using CSS/inline styles, or you can use ASP.NET themes.
Inline styles could look something like this:
/*color of the background of the button*/
background-color:#ff0000;
/*font color of the button*/
color:#ff0000;
Or you can do css something like this:
<style>
.buttonStyle
{
background-color:#ff0000;
color:#ff0000;
}
</style>
<asp:Button cssclass="buttonStyle" id="etc" runat="server" text="button"></asp:Button>
For more on themes look here: http://msdn2.microsoft.com/en-us/library/de93t31k.aspx
12/15/2007 10:51 AM |
Andrew Siemer
#
re: Setting a default button when using master pages
hi thanks
its working fine
8/27/2008 12:10 AM |
Srinivas Vadluri
#
re: Setting a default button when using master pages
Looking great! But one question why to use ToString() when UniqueId itself returns string!!
3/28/2009 3:59 AM |
Ajaykumar Raju
#
re: Setting a default button when using master pages
I have a problem, I have one master page however the default button is in webcontrol. How set default button in this case?
thanks
10/14/2009 5:53 PM |
angelestradamx
Post a comment
T
itle:
N
ame:
E
mail:
Not Displayed
W
ebsite:
C
omment:
Enter the code shown above
News
Twitter
asiemer
(free) IASA Webinar-When and How to Use Event-Driven Architecture-February 10, 9am CST register:
http://bit.ly/d8XzJM
about 4 hours ago
asiemer
@DRB
I like this picture much better than the one I normally see! :P Cut monster in the BG too!
about 5 hours ago
asiemer
@DRB
Is started...have to finish! :P
about 5 hours ago
asiemer
Have to write and turn in the first chapter of ASP.NET MVC Cookbook today...argh!
about 5 hours ago
asiemer
(thats a great pic!) RT
@InfinitiesLoop
: How does the moon stay up daddy?
http://bit.ly/aHPxau
about 5 days ago
asiemer
With github crapping out at the moment...does anyone know where I can get the FubuMVC source? Does anyone have a copy? Writing a how to...
about 5 days ago
asiemer
http://twitp...a - @
bennage here is the pic you wanted to capture!
about 5 days ago
asiemer
Has anyone been able to use ants performance profiler on a local asp.net mvc spark web site? I get a 404 error once IE opens!
about 8 days ago
asiemer
@scottw
yes...they work great together!
about 9 days ago
asiemer
Book - brownfield applications in .net: "Always code as if the guy maintaing your code is a violent psychopath who knows where you live"
about 14 days ago
Tag Cloud
asp.net mvc
Atif Aziz
BackLINQ
Ben Scheirman
Dependency Injection
ELMAH
Inversion of Control
Javier Lozano
Jayrock
LINQBridge
MoreLINQ
MVC Contrib
MVC Turbine
ReSharper
Sara J Chipps
spark view engine
more tags...
Recent Comments
This really helped and fixed the problem. Other we...
by nederlandstalige casino’s
Though you can use the Single extension method of ...
by http://www.intercasino.ws
I share your paint. The designer for the Entity F...
by MomentSurfer
I will have the first podcast up this weekend. I ...
by Andrew Siemer
There are quite a few places to get the code! You...
by Andrew Siemer
Archives
January, 2010 (4)
December, 2009 (3)
November, 2009 (11)
October, 2009 (2)
September, 2009 (1)
August, 2009 (1)
July, 2009 (2)
June, 2009 (1)
May, 2009 (3)
April, 2009 (3)
March, 2009 (3)
November, 2008 (2)
October, 2008 (2)
September, 2008 (2)
June, 2008 (2)
April, 2008 (1)
March, 2008 (1)
February, 2008 (5)
January, 2008 (1)
November, 2007 (2)
October, 2007 (4)
Post Categories
Writing / Editing Books
ASP.NET
C#
SQL
AJAX
Architecture
Automated Builds
Funny
My Monsters
LINQ
Friends
Frank Wang
My Other Blogs
ASP.NET 3.5 Social Networking
From Fat to Freak
Horse training, care, and riding
Photography
My public profiles
AndrewSiemer.com
FaceBook.com
LinkedIn.com
My boating stories
MySpace.com
Virtual .NET Users Group
Syndication:
RSS
ATOM
Hosted by
Copyright © Andrew Siemer - www.andrewsiemer.com