Jump to content

Check out our Community Blogs

Register and join over 40,000 other developers!

Recent Status Updates

View All Updates

- - - - -

How to edit .cshtml files

asp.net forms

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1 jasonalien


    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 194 posts

Posted 18 July 2014 - 04:47 AM

I have created CRUD pages using asp.net MVC 5.


I want to edit the generated .cshtml files or do the necessary thing to change the look of the website.


For example : 

<div class="form-group">
  @Html.LabelFor(model => model.Adres, new { @class = "control-label col-md-2" })
   <div class="col-md-10">
     @Html.EditorFor(model => model.Adres)
      @Html.ValidationMessageFor(model => model.Adres)

The generated textbox here is small, I want to make it bigger. Also it says "Adres" not "Address". I want to change that too..


Can you tell me how I can achieve those things?


I'd appreciate if you show me a source for this..


Thank you.

Edited by bahadirtr, 18 July 2014 - 05:46 AM.

#2 WingedPanther73


    A spammer's worst nightmare

  • Moderator
  • 17757 posts

Posted 18 July 2014 - 05:59 AM

You can directly edit them in Visual Studio. With that said, if you change Adres to Address, and do not update the model elsewhere to correspond, it will simply fail to compile. As for the generated textbox, without seeing the CSS that controls the appearance of your divs, it's hard to say what all is going on.

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download