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 over 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 over 6 years ago
@subzero: Does <%: html.Partial("mypartial_here") %> yield any output?
alixaxel over 6 years ago
I will check on that in the morning - thanks!
subzero over 6 years ago
Nothing renders in the partial view when I use this code.
subzero over 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 over 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 over 6 years ago
@subzero: Could you share snippets of both versions?
alixaxel over 6 years ago
Will be able to in the morning. Traveling all day today.
subzero over 6 years ago
@subzero: Any news on this?
alixaxel over 6 years ago