[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Format login control button.

Posted on 2010-11-27
11
Medium Priority
?
520 Views
Last Modified: 2012-05-10
I have the following code to make a button...


<a class="button" href="#" onclick="this.blur();"><span>Login</span></a>

The CSS on this element styles my button how I would like it (but note that I am not using an ASP.NET/HTML button control). I have used this styling throughout my website. I have placed a login control onto my page but the styling of the 'Login' button is useless and I would like to make this in line with the rest of the buttons on my site. How can I adapt the line above to submit the login control?
0
Comment
Question by:Blowfelt82
10 Comments
 
LVL 33

Expert Comment

by:hongjun
ID: 34221701
Try using the CssClass attribute.
<asp:Button id="btnLogin" runat="server" CssClass="button"></asp:Button>

Open in new window

0
 

Author Comment

by:Blowfelt82
ID: 34222233
The CSS class I use is for an anchor element not a button element so I dont think this would work.
0
 
LVL 33

Expert Comment

by:hongjun
ID: 34222249
Have you tried? Styles work for all controls.
It depends on how you style it.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Blowfelt82
ID: 34222257
Just tried it, but didnt work... I dont think the CSS properties I use can be applied to buttons
0
 
LVL 33

Expert Comment

by:hongjun
ID: 34222284
Use <asp:LinkButton...>  instead.
0
 

Author Comment

by:Blowfelt82
ID: 34222341
Ok, but how would I get the LinkButton to submit a login form?
0
 
LVL 83

Assisted Solution

by:CodeCruiser
CodeCruiser earned 664 total points
ID: 34222895
0
 
LVL 33

Assisted Solution

by:hongjun
hongjun earned 664 total points
ID: 34223583
By default, the LinkButton will do a postback.
See this for an example
http://www.asp101.com/samples/login_aspx
0
 
LVL 2

Accepted Solution

by:
Aazmodeus earned 672 total points
ID: 34225012
If you want to use <a> tag to submit form, you should consider using javascript. E.g. if you use jquery do it like this <a href="#" onclick="$(form_selector).submit(); return false;">Login</a>.
But I don't understand why you can't change the look of you submit button, so that it will be just like a link. Create some css-style and assign it to your submit button:
.login-submit
{background-color:__your_background_color__; border:0; color:__your_link_color__; __all_the_other_stuff_you_need__}
0
 
LVL 29

Expert Comment

by:Kumaraswamy R
ID: 34421779
This question has been classified as abandoned and is being closed as part of the Cleanup Program.  See my comment at the end of the question for more details.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question