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

YII Booster Select2Row don't work after renderpartial

I'm trying to use the yiibooster select2row widget in a view updated via ajax. I have a select2row with the list of name of people retrieved by model. After selecting one I try to update the other fields in the view by ajax and renderpartial. I do…
0
votes
1 answer

How to create a comment box in asp.net MVC using partial post

I want to create a comment box in MVC. It should convert the text string from text box into label field and display on screen. We will be doing partial posts, as we don't want entire page to be posted back to server.
user43553
  • 65
  • 5
  • 14
0
votes
0 answers

convert text box string to label in mvc

i have a check box and a text box. On selection of the check box, the string in the text box must be returned in the form of a label. I am new to MVC. please provide some guidelines and links. Html:
user43553
  • 65
  • 5
  • 14
0
votes
1 answer

using Html.RenderPartial for the files in other Views/folders

How to use Html.RenderPartial for the PartialViews in other Folders? I have tried as: <% Html.RenderPartial("~/Views/User/Users.ascx", Model); %> It thrown an error: System.InvalidOperationException: The partial view '~/Views/User/Users.ascx' was…
Prasad
  • 58,881
  • 64
  • 151
  • 199
0
votes
1 answer

How to reload javascript after partial render?

There are Products that has_many Images. On the Product edit template there is a partial for adding and deleting Images _edit_images.html.erb <% if @product.images != nil && @product.images.count > 0 %>
0
votes
2 answers

Render a view for an email in Asp.Net MVC 2 in a background service

I need to render a view to send as an email using Asp.Net MVC 2. Using the new Html.Partial method it is easy to render a view to a string and then send it as an email as long as you do it from inside a controller or a view (where you can access the…
Sruly
  • 10,200
  • 6
  • 34
  • 39
0
votes
2 answers

Yii RenderPartial not working

I am using renderParial() function to render views->subscriber->_form from views->layouts->main.php Problem i am getting is I am failed to insert data using this. Gii generated CRUD is working perfectly but when i render _form and want to insert…
Mushahid Hussain
  • 4,052
  • 11
  • 43
  • 62
0
votes
1 answer

Rendering Yii's Flash message inside the partial view with ajax call

I have a problem displaying Flash messages in Yii. Inside my view I have an ajax button, calling method update of my controller. Inside the update method I want to set a Flash message and display it inside my view when it's updated with new data. …
RB_
  • 1,195
  • 15
  • 35
0
votes
1 answer

Rendering a partial in rails. Specifying the partial for a resource gives an error, but not specifying a partial works fine. What gives?

I've got this working now quite accidentally, but I don't understand what causes it to break when I explicitly specify what partials are to be used for rendering the resource/s. Can anyone explain it? The index template for my Posts controller…
Reb
  • 649
  • 1
  • 8
  • 12
0
votes
1 answer

Rails escape_javascript breaks javascript used in partial

I'm using escape_javascript in a js.erb file in order to load a partial with AJAX : $("#datas-user").html("<%= escape_javascript(render :partial => '/pro/users/show_partial', :locals => { :id => @user.id }) %>"); My issue is that the javascript…
Fabien
  • 273
  • 5
  • 12
0
votes
2 answers

Rails controller action duplication

I have a controller show action which does some stuff and renders a view but due to some custom routing, I need a totally different action in a totally different controller to perform the same stuff and render the same view. I don't really wish to…
rctneil
  • 7,016
  • 10
  • 40
  • 83
0
votes
1 answer

Rails: What is wrong with this logic of trying to render a parial on click?

I'm trying to get the activities when the user clicks on a button called display Controller: def display @activities = Activity.all @activities = Activity.order("created_at desc") #we will need to find the Post id Through Users…
0bserver07
  • 3,390
  • 1
  • 28
  • 56
0
votes
1 answer

Rails: How to render more than one partial from one controller's action?

I'm creating comments and I use create.js file that contains an ajax call to add comments, Now I'm adding notification into a partial, I want the notification section to refresh at the same time when the comment is added, I'm trying to do this but…
0bserver07
  • 3,390
  • 1
  • 28
  • 56
0
votes
2 answers

Rails render partial does not use @instance_variable

I'm trying to render a partial, but it's not using my @user_name variable. When you render a partial in a controller, do you need to do something special to pass in variables? Looking at the Rails guides, I didn't see anything that said…
EmilyNeedsToCode
  • 217
  • 1
  • 2
  • 7
0
votes
2 answers

Unhappy with the rail way of rendering partials

my question considers the partial handling in Rails. I just can't get the reason for some design decisions. If I render a partial like this: <%= render partial: 'foo/bar', object: @herbie %> Where @herbie is an object of class Car. Why is the…