in Education by
i keep getting errors when trying to post an from my view to my controller using FormCollection. the database type for expenseBackup is a decimal(8,2). I keep getting "Cannot impliticity convert string to decimal?". Then when i try expenseBackup = Int32.Parse(formValues["expenseBackup"]), i get "Input string was not in correct format". i don't want to have to convert anything in the controller i don't understand why it won't just pass as a decimal through the FormCollection. Controller [HttpPost] public ActionResult Create(FormCollection formValues) { var data = new usr_ebillingClientDatabase() { client = formValues["client"], //is a string from form expenseBackup = formValues["expenseBackup"] //is a decimal from form }; dataContext.table1.InsertOnSubmit(data); try { dataContext.SubmitChanges(); return RedirectToAction("Index"); } catch (Exception e) { return RedirectToAction("Index"); } } View
@Html.EditorFor(model => model.expenseBackup, new { htmlAttributes = new { @class = "form-control" , , @type="number", @step=".01" } })
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

Related questions

0 votes
    I have implemented exception handling as mentioned in below link How to pass error message to error view in ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
0 votes
    The disk controller uses ________ at each sector to ensure that the data is not corrupted on data ... Database Interview Questions and Answers for Freshers and Experience...
asked Oct 11, 2021 in Education by JackTerrance
0 votes
    I'm trying to make a function in c to create and return a new struct similar to a constructor in ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 21, 2022 in Education by JackTerrance
0 votes
    I am facing a problem that makes me to waste a lot of time. Each time I insert an element on a ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 14, 2022 in Education by JackTerrance
0 votes
    According to FOSElasticaBundle documentation it is possible to configure application to use custom query builder method ... Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 14, 2022 in Education by JackTerrance
0 votes
    I am facing a problem that makes me to waste a lot of time. Each time I insert an element on a ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 10, 2022 in Education by JackTerrance
0 votes
    I have an array in one view controller that I want to send to two other view controllers - i am ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 22, 2022 in Education by JackTerrance
0 votes
    I have an array in one view controller that I want to send to two other view controllers - i am ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 14, 2022 in Education by JackTerrance
0 votes
    I want pass values from my view to a controller action however every time i do the parameter is null ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 7, 2022 in Education by JackTerrance
0 votes
    I have an array in one view controller that I want to send to two other view controllers - i am ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 6, 2022 in Education by JackTerrance
0 votes
    I want pass values from my view to a controller action however every time i do the parameter is null ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 4, 2022 in Education by JackTerrance
0 votes
    We are using In memory data store possibly Hazecast or Redis (technology is undecided yet) Predominantly the ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 26, 2022 in Education by JackTerrance
0 votes
    I have a base View Controller with various containers inside it. I use them to control the current step ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 17, 2022 in Education by JackTerrance
0 votes
    In Ruby on Rails Development (or MVC in general), what quick rule should I follow as to where to ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 31, 2022 in Education by JackTerrance
0 votes
    I need help on some logic. This is how my application is structured. Welcome View Controller > Login View ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 25, 2022 in Education by JackTerrance
...