McKelt.com

Remembering Thoughts

Recent comments

Authors

Categories


Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010

ASP.Net MVC tips

How to add a css class to a Html.TextBox

<% using(Html.BeginForm()) { %>
    <div style="width:500px; padding-top:15px;">
        <span class="loginleft">
            <label for="username" class="largetext">Email:</label>&nbsp;&nbsp;
        </span>
        <span class="loginright">
            <%= Html.TextBox("email", string.Empty, new { @class = "textbox" }) %>  
        </span>
         <br />
         <br />
        <span class="loginleft">
            <label for="password" class="largetext">Password:</label>&nbsp;&nbsp;
        </span>
        <span class="loginright">
            <%= Html.Password("password", string.Empty, new { @class = "textbox" }) %>  
        </span>
        <br /> 
        <br />
        <span class="loginleft">
        &nbsp;
        </span>
        <span class="loginright">
            <%= Html.SubmitButton("loginSubmit", "Login", new { @class = "button" }) %>
        </span>
    </div>
    <% } %>

Posted by chris on Sunday, April 19, 2009 10:44 PM
Permalink | Comments (3) | Post RSSRSS comment feed

Comments

Emily United States

Wednesday, June 03, 2009 2:59 PM

Emily

  
What is good and clean code! Yes, you simply genius!

future web themes United States

Wednesday, June 24, 2009 10:28 AM

future web themes

I really like the new design; it does seem to make the content very easy to find and the cartoons, imo, do give the site more of a personal feel (as you mentioned).
I don't know much about the franchise software sector
but I can really see this design helping your company stand out. Nice work!

peter zhang People's Republic of China

Thursday, June 25, 2009 9:56 AM

peter zhang

good~ thanks for your blog