Sabab Zulfiker

Sabab Zulfiker

  • NA
  • 85
  • 25.5k

Text after space character cut off in input text field

Mar 15 2018 9:22 AM
I am using MVC5 razor syntax. When I pass a string with a value containing space, the text after space cut off in the value section of input text field.
 
My view code is given below:
 
@{
ViewBag.Title = "Edit";
Layout = "~/Views/Shared/_Layout.cshtml";
string s1 ="sabab zulfiker";
}
<form method="Post" id="addSyllabus" enctype="multipart/form-data">
<label for="colSyllabusName">Sylabus Name:</label>
<input type="text" id="colSyllabusName" name="colSyllabusName" class="form-control" value=@s1 />
<br />
</form>
 
When I load the page , I get only "sabab" in text box. But not get "sabab zulfiker".
What should I do now ?

Answers (1)