Dear Sir/Madam,
I am very new in the MVC coding. i have a below problem.please help me.Thanks in advance.
I have Three text box in asp.net MVC form. Author Id,Author Name and Author address.
I have two button(Previous and Next).when I click on the next button it will show one by one Author records from Sql server database.i used entity framework in MVC 4.
Design view in mvc
Author
@Html.DisplayNameFor(model => model.AuthorId)
@Html.DisplayFor(model => model.AuthorId)
@Html.DisplayNameFor(model => model.Name)
@Html.DisplayFor(model => model.Name)
@Html.DisplayNameFor(model => model.Location)
@Html.DisplayFor(model => model.Location)
Database Details:
CREATE TABLE Author1
(
AuthorId INT PRIMARY KEY IDENTITY(1,1) NOT NULL,
Name VARCHAR(100) NULL,
Location VARCHAR(50) NULL,
)
INSERT INTO Author1 VALUES('bubai','Kulti')
INSERT INTO Author1 VALUES('Ajay','Malad')
INSERT INTO Author1 VALUES('Rajesh','Kharghar')
INSERT INTO Author1 VALUES('Smita','Thane')
INSERT INTO Author1 VALUES('Amit','Burdwan')
INSERT INTO Author1 VALUES('Sumit','Golf Green')
select * from Author1
Please send me complete and simple code as i am very new(Fresher) in mvc coding.
Thanks for kind help.
Bubai Banerjee
Jaganathan BantheswaranPosted Jan 8, 2014, 12:44 AM
http://www.c-sharpcorner.com/UploadFile/cd7c2e/create-an-editable-webgrid-in-mvc4-to-implement-crud-operati/
In the above example, the webgrid is editable. Read the whole article.
For more details on webgrid,
http://www.c-sharpcorner.com/tags/1/webgrid/
bubai banerjeePosted Jan 8, 2014, 12:10 AM
As per my requirment i think webgrid will not work. It is textbox display.Furthermore, your example link is not working.Please send me some good and simple link to work it out as i am a fresher.
Thank you
buabi
Jaganathan BantheswaranPosted Jan 7, 2014, 6:53 AM
Try to use WebGrid.
Here are the examples.