I'm learning Node.js, Express, haml.js and liking it. I've run into a prety annoying problem though. I'm pretty new to this but have been getting nice results so far.
I'm writing a jquery heavy web app that relies on a table containing divs. The divs slide around, switch back and fourth and are resized etc to my hearts content.
What I...
Hello World!
Hi guys, I have a master page with two partial viewson it both of which submit to the AccountController. When I click Submit on either of the partial views the following happens:
If I declare the partial views like Html.BeginForm("PartialAction1","Account") it redirects to that partial view on clicking submit instead brin...
I am using asp.net mvc2 and having a basic Page that includes a Partial View within a form
<% using (Html.BeginForm())
{ %>
<% Html.RenderAction("partialViewActionName", "Controllername"); %>
<input type="submit" value="Weiter" />
<% } %>
When I submit the form, the httpPost Action of my Page is called, and AFTER that the httpPos...
Is is possible to have a partial view inherit more than one model? I have three models (Contacts, Clients, Vendors) that all have address information (Address). In the interest of being DRY I pulled the address info into it's own model, Addresses. I created a partial create / update view of addresses and what to render this in other othe...
I have several partial views with Javascript that I am trying to move to the bottom of the page. To do this I am trying to use a container in the master page
Master Page ->
<asp:ContentPlaceHolder ID="Foot" runat="server"></asp:ContentPlaceHolder>
Partial view(ascx)
<asp:Content ID="header" ContentPlaceHolderID="head" runat="se...
First, some code:
Here is the initial Action that is called when the page is navigated to:
public ActionResult ListCodeTypes()
{
var CodeList = _entities.Master_Codes.ToList();
List<SelectListItem> items = new List<SelectListItem>();
for (int i = 0; i < CodeList.Count; i++)
{
items.Add(new SelectListItem {
...
I have a html table with a column per row with this html code inside the tags:
<a onclick="modalDialog(this); return false;" href="javascript:void(0)">17795</a>
<div style="display: none;" class="MessageDataDiv">
some text to show up in my jquery modal window when function modaldialog is clicked.
</div>
And the jquery f...
I'm using rr (the mocking framework) and rspec with ruby-on-rails. Also, I'm using the collection short hand for partial rendering. My question: How do I correctly fill out the the following view spec?
describe 'my_view' do
before(:each) do
assigns[:models] = Array.new(10, stub(Model))
end
it "should render the 'listing' part...
I need to send some other data, ideally wrapped in a JSON object, down to the client. As well as that however I need to send a Partial view. Now I can only think of two ways:
Send JSON object and then make another call to load contents of partial view into div.
Send HTML for Partial View as a property of the JSON object and then load i...
Ok, so I had this working just fine before making a few controller additions and the relocation of some code. I feel like I am missing something really simple here but have spent hours trying to figure out what is going on. Here is the situation.
class Question < ActiveRecord::Base
has_many :sites
end
and
class Sites < ActiveRecor...
Hi guys,
I have a question about asp.net mvc-2 strongly typed partial views, and view models.
I was just wondering if I can (or should) have two strongly typed partial views on one page, without implementing a whole new view model for that page.
For example, I have a page that displays profiles, but also has an inline form to add a q...
The following is in the text_field.
= f.text_field :title, :size => 50, :onchange => remote_function(:update => :suggestions, :url => {:action => :display_question_search_results})
The following is in display_questions_search_results.rjs.
page.insert_html :bottom, 'suggestions', :partial => 'suggestions'
Whenever the user types, I'...
Is there a way to dynamically inject partial templates (and have it work the same way in both Ruby & Javascript)? Basically, I'm trying to render different types of objects in a list.
The best I can come up with is this:
<div class="items">
{{#items}}
<div class="item">
{{#is_message}}
{{> message}}
{{/is_message}}
{{#is_pictu...
Hi,
I have an edit form that uses an ajax form to submit to the controller. Depending on the data submitted I redirect the user to one of two pages (by returning a partial view). Both pages rely on javascript/jquery and neither use anything common between the pages.
What is the best way to initialise these javascripts on each page? I k...
With jQuery, is it possible to call /ControllerName/GetSomething?parameter=test, while in GetSomething method I have following:
public ActionResult Details()
{
filterQuery.OrderBy = Request.QueryString["parameter"];
var contacts = contactRepository.FindAllContacts(filterQuery).ToList();
return View("ContactList");
}
and ...
In ASP.NET MVC, there are these snippets of html called view templates which appear when their matching data appears on the screen. For example, if you have a customer order and it has a vendor address, the vendor address view template shows up populated with data.
Unfortunately, these don't have access to "MasterPages" nor are aware o...
I have an OrderForm domain class, which has property subclasses, something like:
interface IOrderForm
{
int OrderId { get; }
ICustomerDetails CustomerDetails { get; set; }
IDeliveryDetails DeliveryDetails{ get; set; }
IPaymentsDetails PaymentsDetails { get; set; }
IOrderDetails OrderDetails { get; set; }
}
My "De...
I have a file upload button on my MVC view. After the file is uploaded, my FileList partial view on the page should refresh.
I tried to upload with Ajax.BeginForm(), but have discovered that Ajax will not submit file data.
I've got the file upload working now by using the jQuery Form plugin, which lets you ajaxify the normal Html.Begi...
I have done partial views in ASP.NET MVC but now I want to convert it to ASP.NET. I have used AJAX and JavaScript. How can I convert the following:
<a href="#" onclick="LoadPartialView('#MainContentDiv', '<%=Url.Action("AdminHome", "Admin")%>')">Home</a> ,
<input type="button" value="Submit" onclick="LoadPartialViewPost('#Ma...
I am developing a site similar to a portal with loads of individual portlets. There is an Overview page and the view calls Html.RenderPartial for about 10 other shared views. All those views are strongly typed and expect some data. So, I have portlets for chat, messages, status and so on.
All this data depends only on the currently log...