RobinHood
RobinHood

Reputation: 2407

Visibility On and Off MVC2

How to make a radio button by default checked..Here is my button..

  <%=Html.RadioButton("Method","1")%><label>Normal Method</label>

and also a div to be visible false..I had given like this, but no use..

 <div id="Normal" visible="false">
 <p>
 //............  
 </p>
 </div>

Upvotes: 0

Views: 790

Answers (1)

Darin Dimitrov
Darin Dimitrov

Reputation: 1039588

<%= Html.RadioButton("Method", "1", true) %>

or by setting ViewData["Method"] = "1" inside your controller action.

Remark: there's no such attribute as visible="false" on a div.

Upvotes: 1

Related Questions