asp.net-mvc-partialview

Handing forms in ViewUserControls

I am rendering out a ViewUserControl (.ascx file) in a view: <% Html.RenderPartial("Comments", Model.Comments); %> This ViewUserControl shows associated comments on an entry. I would like this control to render out a form as well, so users of my application can contribute. How would you add a form to a ViewUserControl and handle it's...

What HTML helper do I use to create a simple dropdownlist that doesn't take in any variables?

I want to have a simple select->option dropdown list that I am not passing any (SelectItem collection) values to. I already know the values so I don't need to do all that (they are static). Need to do something like so: <select id="day" name="day"> <option value="1">Sunday</option> <option value="2">Monday</option> </select> <sel...

Can a partial view be used to do Ajax item updates?

I have a table built from a list of defect codes. Can part of each row load a sub-table item complete with submit buttons? Sample table: <table><tr> <th>Code</th><th>Description</th> <th>Impact to your customers</th> <th>Impact to your associates</th> <th>Save</th> <th>Save Errors</th></tr> Where the first 2 columns are populated f...

Is it possible to access tags located in a partial view from my css file (external file)?

Hello, Let's say, I've got this. <div id = "myDiv"> <% Html.RenderPartial("MyUserControl"); %> </div> and inside my partial view, I've got this. <% = htm.TextBox("myTextBox")%> How can I style this tag from my Site.css file under Content folder? For instance, I want the back ground color to be green. Thanks for helping ...

Is it possible to utilize internal methods on controllers to reduce duplication?

in a partial view I have the following: <%Html.RenderAction(MVC.User.GetComments(Model.UserGroupName)); %> can I render a Controller's PartialViewResult in a View without going through routing so I can pass arguments directly from the model so that the arguments I'm passing to the controller never get sent to the user or seen by the u...

ASP.NET MVC PartialView postback: how to validate data?

Hello I am using ASP.NET partial views like in this example <% using (Html.BeginForm()) { %> <table cellspacing="2" cellpadding="0" border="0" width="100%"> <tr> <td><%= Html.LabelFor(model => model.PersonName)%></td> <td> <%= Html.TextBoxFor(model => model.PersonName)%> <%= Html.Validati...