TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Dr.Ajay Kashyap
NA
521
285.1k
First Letter In Uppercase in Asp.net Mvc
Feb 14 2017 1:44 AM
for (i = 0; i < result; i++)
{
string SubCat = MyArrayUpper[i].Trim();
foreach (var scn in subcategoryname)
{
var Subcategory_name = scn.SubCategory.Trim();
Subcategory_name = Subcategory_name.ToUpper();
if (SubCat == Subcategory_name)
{
active = true;
}
}
if (active == false)
{
string subcat1 = SubCat;
/// subcat1 this is the varaible in which i am storing value
//// and here i want
First Letter In Uppercase before storing in db
subcat1 =char.ToUpper(subcat1[0]) + subcat1.Substring(1);
var NewSubCAtegory = db.MasterSubCategories.Create();
NewSubCAtegory.SubCategory = subcat1;
db.MasterSubCategories.Add(NewSubCAtegory);
db.SaveChanges();
}
}
Reply
Answers (
9
)
how to display the data on web grid in mvc?
How to Use DataTable in Asp.net Mvc