Click here to Skip to main content
15,886,787 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
Output page show like inspect element format like

Hi:<input id="Text1" type= Lost And Found />

but it should be show like
Hi:Lost And Found

my controller is


C#
public ActionResult Preview(ListingModel model, FormCollection form)
        {
           return View("Preview",model); 
       }

and my view is
C#
 @using KebhariBlog.Models.Listing;
@model ListingModel
@using KebhariBlogBL.BL;

Hi:<input id="Text1" type=@Model.Title />
Posted
Updated 20-Feb-14 0:35am
v2

1 solution

Please try is as below.

If it's a Text box

Hi: <input type="text" name="Text1" id="Text1" value=@Model.Title />


If it's Label

Hi: <label for="Text1">@Model.Title</label>
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900