goo.gl/bPcyXW : Buy me a Coffee bit.ly/30fPDMg : AspNet Core MVC Tutorials bit.ly/3yTsztF : More AspNet Web Form Tutorials bit.ly/36IA1cH : CRUD in AspNet Core MVC bit.ly/2Z7PI3e : CRUD in Asp Web Form bit.ly/2TA9N14 : GridView CRUD in Asp Web Form bit.ly/2Z784pi : MySQL CRUD in Asp Web Form bit.ly/3Z5uWUR : jQuery DataTable Playlist with Asp Web Form bit.ly/2MlkMuM : Login in Asp Web Form
Thanks DOTNET MOB. It works fine and saves to the database. However, I get an error in the front-end. Value cannot be null. Parameter name: items Below is the line with an error: Line 22: @Html.DropDownListFor(model => model.Role_id, new SelectList(Model.RolesCollection, "Role_id", "Role_name"),"select") Assist.
I have a question please, how can i specific ID for dropdownlist. to use Jquery in dropdwonlist I must give dropdwonlist ID @Html.DropDownListFor( model => model.ProductID, new SelectList(Model.productCollection, "ProductID", "ProductName"),"select")
jquery.selectBox.js:1165 Uncaught ReferenceError: jQuery is not defined at jquery.selectBox.js:1165 (anonymous) @ jquery.selectBox.js:1165 AddOrEdit:35 Uncaught ReferenceError: $ is not defined at AddOrEdit:35
Suppose if you want two dropdownlist, then there will two list in model class and you can follow the same method. Hope I answered your question, if not let me know :)
In that case you can store drop down list data in cache memory or in a c# static list. you can even filter items from this store items. you need update this storage when there is a change in the related table.
goo.gl/bPcyXW : Buy me a Coffee
bit.ly/30fPDMg : AspNet Core MVC Tutorials
bit.ly/3yTsztF : More AspNet Web Form Tutorials
bit.ly/36IA1cH : CRUD in AspNet Core MVC
bit.ly/2Z7PI3e : CRUD in Asp Web Form
bit.ly/2TA9N14 : GridView CRUD in Asp Web Form
bit.ly/2Z784pi : MySQL CRUD in Asp Web Form
bit.ly/3Z5uWUR : jQuery DataTable Playlist with Asp Web Form
bit.ly/2MlkMuM : Login in Asp Web Form
thank you for sharing it worked pefectly ... but I have a question what should I do to save the ProductName in my Stock table not the ProductID ?
instead selected value try selected text.
thank you for your tutorials, i appreciate your hard work
Can you please provide the full video.
Need to implement for create and delete.. Need help immediately. Thanks in advance.
keep going, keep doing, we always wait for your tutorials.
Hi, Can this be done using stored Procedure?
Will u tell me how can I get matching record entered in a textbox from database without using entity framework
hi, how can i send 2 collections from controller to view?? with this example?
Thanks DOTNET MOB. It works fine and saves to the database. However, I get an error in the front-end.
Value cannot be null.
Parameter name: items
Below is the line with an error:
Line 22: @Html.DropDownListFor(model => model.Role_id, new SelectList(Model.RolesCollection, "Role_id", "Role_name"),"select")
Assist.
try to debug the application. model.Role_id cannot be null, by default it will be 0.
Extremely awesome.
Thanks for your kindly sharing! This sample is very useful and funny.
is dbModels the name of the database context?
Hi, is there anyway i could use this using DapperORM? Thanks
Yes you can!
What if I update the DB and models, is it going to lose your field ProductCollection? Any solution to keep it consistent?
Thank you. it learn it ez
how can i update it into db after giving the values?
I have a question please, how can i specific ID for dropdownlist. to use Jquery in dropdwonlist I must give dropdwonlist ID
@Html.DropDownListFor( model => model.ProductID, new SelectList(Model.productCollection, "ProductID", "ProductName"),"select")
you can one last parameter like this@Html.DropDownListFor(item => ...."select--",new { @id="myid", @class="myclass" })
jquery.selectBox.js:1165 Uncaught ReferenceError: jQuery is not defined
at jquery.selectBox.js:1165
(anonymous) @ jquery.selectBox.js:1165
AddOrEdit:35 Uncaught ReferenceError: $ is not defined
at AddOrEdit:35
plz share the tables also.... database tables query plz.. i am getting an error
How to added left side space in dropdownlist
I Want More Than One DropDown List, What Should I do?
Suppose if you want two dropdownlist, then there will two list in model class and you can follow the same method. Hope I answered your question, if not let me know :)
nice video
nice
awsome
Hmmm Nice Bike sjsjsjsjsj
here how i create a dropdownlist
end of tutorial
this is not for MVC
I Need One More Thing To Know, How To I Store DropDown Data in Database, Much Worried
In this tutorial, we have created drop down list options from database table. so you can use the same procedure.
i retrieve dropdown from one table like department in student, now i want to store selected department against student id, but this is not working
can u please show me the code how to store department dropdown selected value to database against student
When i create new student no data store from dropdown in database i use the same code
In that case you can store drop down list data in cache memory or in a c# static list. you can even filter items from this store items. you need update this storage when there is a change in the related table.
Not complete, does not save into database totally crap sorry!
any error message ?
It does an error. It's because the dropdown list needs to bind again when it submits the form.
123455
WTH was that?? 6:42
a loud fart since he was laughting