asp.net mvc - Url.Content returns null when it has value -


i have interesting error couldn't debug , find information online. got screenshot of error. please see...

enter image description here

this details view of controller. there many records in database table , of them returns error when click records on list view. of them shows page no problems, of them this. see in picture, model.description has value, , long one, , it's far being null or empty value.

that details controller returns db record view.

public actionresult details(string title, int id) {     if (id == null)     {         return new httpstatuscoderesult(httpstatuscode.badrequest);     }     page page = db.pages.where(p => p.menuelement_id == 2).first(p => p.id == id);      if (page == null || helperfuncs.urlfriendly(page.title) != title)     {         return httpnotfound();     }     return view(page); } 

fyi, before error appears, controller returns view no problems. , model.description has value when returns view. after that, pressing f10 brings me view , shows error shown in below picture.

may experienced such issue, please tell me debug , solution of error? if need more information, provide need.

you don't need use url.content(), if want display text. should remove it.

use

<div>@modal.description</div> 

instead of

<div>@url.content(modal.description)</div> 

Comments