asp.net mvc - PartialView and sections -


i have partial view show panel , text below..

<div class="panel panel-warning customhidden" id="infobox"> <div class="panel-heading"><span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span> information</div> <div class="panel-body well-sm">     lorem ipsum dummy text of printing , typesetting industry. lorem ipsum has been industry's standard dummy text ever since 1500s, when unknown printer took galley of type , scrambled make type specimen book. has survived not 5 centuries, leap electronic typesetting, remaining unchanged. popularised in 1960s release of letraset sheets containing lorem ipsum passages, , more desktop publishing software aldus pagemaker including versions of lorem ipsum. </div> 

i text section of passed on view consumes partialview. how can pass text in , maintain html div around text?

you can use (viewbag) in partial view itself. consider following snippet

@{      viewbag.text="lorem ipsum dummy text of printing , typesetting industry. lorem ipsum has been industry's standard dummy text ever since 1500s, when unknown printer took galley of type , scrambled make type specimen book. has survived not 5 centuries, leap electronic typesetting, remaining unchanged. popularised in 1960s release of letraset sheets containing lorem ipsum passages, , more desktop publishing software aldus pagemaker including versions of lorem ipsum.";  }    <div class="panel panel-warning customhidden" id="infobox">  <div class="panel-heading"><span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span> information</div>  <div class="panel-body well-sm">      @viewbag.text  </div>


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -