Questions tagged [renderpartial]

The concept of rendering only a specific part of any UI. May also refer to the .NET `RenderPartialExtensions.RenderPartial` method or the Ruby on Rails `PartialRenderer`

The concept of rendering only a specific part of any UI. May also refer to the .NET RenderPartialExtensions.RenderPartial method or the Ruby on Rails PartialRenderer

391 questions
0
votes
1 answer

Rails form partial that is called via AJAX request is not loading controller variable

As the title says, I am trying to load a form partial with an AJAX request; one of the fields in my form requires a variable in the controller so it can create the select dropdown menu. If I render the partial directly in the view, it accesses the…
Kyle Bachan
  • 1,053
  • 2
  • 15
  • 33
0
votes
1 answer

Does rails automatically pass '@variables' into partial?

I have a simple setup: class EventsController < ApplicationController def edit @user = User.find(params[:user_id]) @event = Event.find(params[:id]) end end events\edit.html.erb:

Edit <%= @user.name %>'s event

<%= render 'form'…
Kocur4d
  • 6,701
  • 8
  • 35
  • 53
0
votes
3 answers

Page doesn't un-cache itself in ASP.NET C#

I sometimes find that I need to press CTRL+REFRESH BUTTON (or simply REFRESH BUTTON) in order for pages to be updated. I thought this may have been a problem with using AJAX Update Panel and things, but it also happens on pages where there is no…
waqasahmed
  • 3,555
  • 6
  • 32
  • 52
0
votes
1 answer

yii datepicker renderpartial ajax - 4th param to true but not working

Wenn i'm loading the view via ajax the datepicker wont work. I already set every single .js and .css file via setclientscript to false on ajaxRequest. Yii::app()->clientScript->scriptMap['jquery.js'] = false; and the other files as…
0
votes
1 answer

render a template all the time

I want to know a way using which a template/partial will always get rendered for all :get request having js/html format I do not want to place it this inside a layout, as most of our request are js and wont use layout The purpose here is, I will use…
Amol Pujari
  • 2,280
  • 20
  • 42
0
votes
2 answers

How do I pass a model property to a partial view with a different model?

Given a view model class public class Foo { public string Fuzz { get; set; } public Bar Bar { get; set; } } public class Bar { public string Fizz { get; set; } } In the controller action I pass the following model to the view: View(new…
stormwild
  • 2,855
  • 2
  • 31
  • 38
0
votes
1 answer

How to cache result of Html.RenderPartialView

I'm on project using asp.net mvc2. In master page I have some lines of code line this <% Html.RenderPartialView("Header", Model.HeaderData) %> ... <% Html.RenderPartialView("LeftMenu", Model.MenuData) %> ... <% Html.RenderPartialView("Footer")…
noname.cs
  • 1,938
  • 4
  • 16
  • 25
0
votes
1 answer

Which is better - Output Caching 6 Child Actions or 6 DB queries using RenderPartial?

I am attempting to develop a cms system that will use tags to display similar content. For example, underneath the news section there will be articles, blogs, news and forum questions that share the same tags. There will be no more than 5 items in…
0
votes
1 answer

Rails Getting Started Tutorial partial not woking for new blog post

I'm working my way through the rails "Getting Started" tutorial, and I'm stuck at the point where they introduce partials. For some reason the partial doesn't work as described when rendered from new.html.erb, although it does work when rendered…
0
votes
1 answer

Edit Form in a Modal with nested resources

In my SCREEN show view i render the comments <%= render @screen.comments.order("created_at DESC") %> that partial contains the comment AND an Edit Link which points to a modal which is also in that partial. <%= link_to "Edit", '#EditComment',…
0
votes
2 answers

Pass Viewdata as member from other viewdata to RenderPartial makes the first null

The strongly typed SearchViewData has a field called Colors that in it's turn is a ColorViewData. In my /Colors.mvc/search I populate this viewData.Model.Colors based on the given search criteria. Then, based on several factors, I render one of a…
Boris Callens
  • 90,659
  • 85
  • 207
  • 305
0
votes
0 answers

Rails Partial Rendering for static pages

I am building a personal website on Rails 3.2 It is almost a static website with a bit of javascript interactivity and few Db operations. I was wondering, will it make any difference in my app if I use partials for static content? Or should I…
Ajey
  • 7,924
  • 12
  • 62
  • 86
0
votes
1 answer

RoR Class vs Instance variables, and relaying a value to partial

I have a controller "mainpage", with a correspondingly named view. The controller creates a @myLocalSuites variable, and the view includes the following line:
  • <%= link_to "Perforce", :action => 'renderp4', :remote => true,…
  • Steve Hall
    • 469
    • 1
    • 5
    • 23
    0
    votes
    1 answer

    Navigate with partials using rails and bootstrap

    I'm using rails with Bootstrap. I have a basic page with navbar along the top. What I am struggling to achieve is how to define the targets for the options in the navbar as partials beneath this navbar. I've trawled threads on here - finding things…
    Steve Hall
    • 469
    • 1
    • 5
    • 23
    0
    votes
    1 answer

    rails controller action not being called

    The problem I'm running into deals with rendering a partial. I basically have a link which should get updated after the user puts some text in a text field. The first time it works fine. The user types in the text, the link gets updated and then…
    Ameya Savale
    • 431
    • 1
    • 8
    • 21