Bootstrap Drop Down Pills
New here? Learn about Bountify and follow @bountify to get notified of new bounties! x

I am building a page in ASP.NET mvc and have bootstrap installed. I am using a drop down pill menu and cannot get it to work with <% html.renderpartial("mypartial_here")%>. When I place the exact same code into the page the dropdown pill works just fine.

Need help getting this to work with the html.renderpartial

Thanks

Can you post the code and HTML of the relevant files with and without the partial?
skram 6 years ago

Crowdsource coding tasks.

1 Solution


html.RenderPartial() is a void method, and being so you need to add a trailing semicolon like this:

<% html.RenderPartial("mypartial_here"); %>
This did not solve it as I received an error message of: BC30037: Character is not valid. when I attempted to load the page.
subzero 6 years ago
@subzero: Does <%: html.Partial("mypartial_here") %> yield any output?
alixaxel 6 years ago
I will check on that in the morning - thanks!
subzero 6 years ago
Nothing renders in the partial view when I use this code.
subzero 6 years ago
@subzero: Then it's very likely that the problem is with your partial itself or the rest of the code. Are you sure the path to your partial is correct?
alixaxel 6 years ago
The partial displays just fine. What does not happen is that I am using the dropdown toggle pills and they will not expand when using the partial. When I place the exact same code that is in the partial into the aspx page itself everything works just fine. It has to be an issue with the dropdown and the partial together.
subzero 6 years ago
@subzero: Could you share snippets of both versions?
alixaxel 6 years ago
Will be able to in the morning. Traveling all day today.
subzero 6 years ago
@subzero: Any news on this?
alixaxel 6 years ago