Andrew Siemer's Blog
Enterprise Web Applications, ASP.NET, C#, SQL Server, Architecture, & Writing
Blog Stats
Posts - 48
Articles - 0
Comments - 107
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
I uploaded a YouTube video -- Everyone say good bye!
http://www.y...atch?
v=Qc9AdXbolDg&feature=autoshare_twitter
about 17 hours ago
asiemer
I uploaded a YouTube video -- Trinity Siemer riding on her Quarter Horse Jessy
http://bit.l...SBDvf
about 17 hours ago
asiemer
Off to ride horses, then I will finish putting the Javier Lozano
@jglozano
interview together. Just have to piece the show around it!
about 1 day ago
asiemer
@blowdart
but then I have to also wonder about the object DB approach too?? :P No schema
about 2 days ago
asiemer
@blowdart
I would probably go with key based in my article series as the rest would overwhelm the topic of building a SO site
about 2 days ago
asiemer
@blowdart
I have read that actually! Since you brought up the topic I just forwarded a good MSDN article on the topic to co-workers!
about 2 days ago
asiemer
@blowdart
Along this line then, are you for separate db, separate schema, or key based separation? Is this your specialty? Interview?
about 2 days ago
asiemer
@blowdart
guess I could pick an approach and explain why (point to other approaches) - your thoughts?
about 2 days ago
asiemer
@blowdart
Might be a good time to address this given that StackExchange is the ultimate goal! 1 article won't do the topic justice though!
about 2 days ago
asiemer
@blowdart
Are you referring to my article series on
@dotnetslackers
?...or something else?
about 2 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
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
I am not sure I have the source code for this one ...
by Andrew Siemer
Thanks for the great article! Could you please poi...
by chris
Hi Andrew,Thanks for this great book,where I can d...
by developer
Archives
November, 2009 (10)
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