Click here to Skip to main content
15,890,186 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am in a pretty unique situation. You can say I'm being paid to go to school. I'll be more forward. I got a job as a developer, without actually being a developer. They are taking a chance on teaching me how to do this as opposed to me accruing debt with the possibility of failure. The only consequence here is failure. I can live with that.

Right now I am making a simple form. It's a returns form for users here to fill out based on information customers give them.

Here is my class.

C#
namespace LVS.Models
{
    public class ItemReturn
    {
        [DisplayName("Customer:")]
        public string custName { get; set; }


        [DisplayName("Phone #:")]
        public string phoneNumber { get; set; }


        [DisplayName("Company:")]
        public string company { get; set; }


        [DisplayName("Invoice Number/Web order #:")]
        public int invoiceWebOrder { get; set; }


        [DisplayName("Shipping Date:")]
        public DateTime shipDate { get; set; }


        [DisplayName("Ship Method:")]
        public string shipMethod { get; set; }


        [DisplayName("Tracking Number:")]
        public string trackNumber { get; set; }


        [DisplayName("Reason Code")]
        public int reasonCode { get; set; }


        [DisplayName("Details: Include quantity, expiration dates, lot numbers of product(s), and images if available")]
        public string detailBox { get; set; }
    }
}


Here is what is in my controller.

C#
public ActionResult Index()
           //Here I am declaring my class. Giving it purpose.  Making it the Highlander.
       {
           var model = new ItemReturn();
           return View(model);
       }




So when I run, it brings up a pretty nice looking form. It's great, but it's not all I must accomplish. I need to get words around these boxes, and I just plum don't know the terminology I am looking for. There are times when the people who mentor me are just not here, so I'm left on my own to figure things out, as I have these things here. What I would like to know is how do I get the filler text that is in between these boxes in where they are supposed to be. I've gone into the view and edited it in, but ALL OF THAT just appears below the data fields/text boxes. that's not going to work, and google isn't being very friendly with me today. I appreciate any advice I can get, and I'm sorry for my lack of professional terminology.

Howdy, I noticed someone has already down voted this without providing me any information. I am trying to learn here. I have tons of browser windows open covering a plethora of different things that I've been cramming into my head all day. I'm going to take an excerpt from below the solution window in plea for you to stop being rude. "We're here to help developers along their way, not to make them feel stupid." Down voting without providing context is incredibly rude and pointless.

BTW... I am not looking for a solution, I'm looking for directional guidance. I would like to at least have key words, some sort of hint to get me where I need to go, I do not like being solved. It takes away the work and joy of learning. I thank all who help.
Posted
Updated 10-Jul-14 11:54am
v4
Comments
arvind mepani 11-Jul-14 7:33am    
provide what you want in styling mvc form, not this type of story
hinarf 11-Jul-14 14:47pm    
.... I just typed out a very long thing and apparently hitting delete can make you go back a page. I'm super pissed... anyways.

I just need to arrange the fields differently, as I called them from the controller, I wouldn't know how to do that. Just a nudge in the right direction is all I ask.

I need them to display as such Field A Field B
Field C Field D
Field E Field F
Field E

then the details area.

I need to get words inbetween the boxes too. Words that explain to the user what the boxes are for and what can go in them. Not data validation, just things you would find on a form you were filling out on paper. As to your story form request, with my limited knowledge, I can do stories very well. I'm far from being a professional coder, but I'm learning constantly.
[no name] 14-Jul-14 6:33am    
dear you can edit that in the model itself. You create a model class for this table/class and make your view strongly typed to that model. Then assign the model as in:
var viewModel = new ItemRun
{
assgn the model properties = your main class's properties
}
then aafter this in the view page you can manipulate evry property as you want.
@Model.(property name)

Hope this helps

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