Add space in text mvc razor view [Resolved]

Posted by Rameshrajendran under ASP.NET on 2/7/2013 | Points: 10 | Views : 7362 | Status : [Member] | Replies : 1
I have one string. resource file value for

Resume / career highlights

and i want to congardinate some spaces and some text in razor view (razor view or another way)

But I try this below code.

@functions{
public string GetSomeString()
{
return MakeMeChangeMyJob.Strings.Resume.PadRight(100) + " (min 100 characters )";//Add space and some tect

}
}

@Html.Label(GetSomeString(), new { @class = Model.AccountType == MakeMeChangeMyJob.Models.AccountType.User ? "required" : "none" })


I was checked in this line are quickwatch

MakeMeChangeMyJob.Strings.Resume.PadRight(100) + " (min 100 characters )";

Its(the methode return) giving correct format for

Resume / career highlights (min 100 characters )




But Not working in lablefor

You like,Please answer me
Have a happy coding.
http://dotnet--solutions.blogspot.in



Responses

Posted by: Rameshrajendran on: 2/7/2013 [Member] Starter | Points: 25

Up
0
Down

Resolved
Now my problem is solved pa.

Razor

<div class="lableSpace">
@Html.LabelFor(m => m.Resume, new { @class = Model.AccountType == MakeMeChangeMyJob.Models.AccountType.User ? "rusumeTextStyle" : "none" })
@Html.Label(@MakeMeChangeMyJob.Strings.MinHundredCharacter, new { @class = "required" })
</div>

Css

.lableSpace label {
font-family: Arial;
display: block;
font-size: 1.2em;
font-weight: 600;
float:left;
}

.rusumeTextStyle
{
padding-right:90px;
}

Juts 20 min work .But I got more worth full idea's. we are try to different different way's. No try only one way.That's give pain for mind.

You like,Please answer me
Have a happy coding.
http://dotnet--solutions.blogspot.in

Rameshrajendran, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response