---
title: "where does render :partial html end up"  
description: "where does render :partial html end up"  
author: "Jayden Bell"  
published: 2013-02-13  
updated: 2013-02-13  
canonical: https://www.mindstick.com/forum/595/where-does-render-partial-html-end-up  
category: "asp.net mvc"  
tags: ["asp.net mvc"]  
reading_time: 1 minute  

---

# where does render :partial html end up

Hi Everyone!

I have a view with an [Ajax form](https://www.mindstick.com/forum/161834/how-do-you-handle-model-validation-errors-in-an-ajax-form-submission-without-reloading-the-page):

<%= form_tag( {:[action](https://www.mindstick.com/forum/155752/what-is-action-result-with-its-types) => 'some_action'}, {:[remote](https://www.mindstick.com/articles/85431/remote-employee-training-tips-tricks) => true}) do %>\
...\
<%= submit_tag "Submit" %>\
<% end %>\
Now, in the [target](https://yourviews.mindstick.com/view/81207/small-industries-should-be-the-target-of-economic-relief-package) action, I want to display a [partial](https://www.mindstick.com/blog/78/partial-class-in-dot-net)

def some_action\
# some [logic](https://www.mindstick.com/articles/331924/best-ways-to-improve-your-logic-building-skills-for-programming)\
[render](https://www.mindstick.com/interview/2205/why-we-need-a-separate-mobile-project-template-while-we-can-render-our-web-application-in-mobile-what-s-new-in-mvc-4-mobile-template) :partial => "some_partial"\
end\
The partial is just html. _some_partial.html.erb could be

<br>Hi, this is the partial</br> \
When I submit the form, I see the html [response](https://www.mindstick.com/forum/12719/how-to-make-response-write-display-special-character-like-lt-gt) packet is received in the [browser](https://www.mindstick.com/blog/155254/which-is-the-best-internet-browser) (with firebug's net logs), but the html doesn't show up anywhere. Where

should the html be? How to render a partial html view from an action?

Please help ASAP.

Thanks in [advance](https://www.mindstick.com/blog/33258/jee-mains-and-jee-advance-exams)

## Replies

### Reply by AVADHESH PATEL

Hi Jayden!

you are not define place where partial view will be render

Try this way

create a file named some_action.js.erb and write the code in it:

// update div with id some_div_id\
$("#some_div_id").html("<%= escape_javascript(render :partial => 'some_partial') %>");\
in controller

def some_action\
# some logic\
respond_to do |format|\
format.js\
end\
end


---

Original Source: https://www.mindstick.com/forum/595/where-does-render-partial-html-end-up

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
