Click here to Skip to main content
15,890,845 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

In mvc 4.0
My requirement is
In Create View, when I insert data to store the database and it will be shown as gridview format in same create view, side by side

In one page(view) one side is textbox,button controls and next side is gridview control

can any one help me...
Posted
Comments
Nathan Minier 12-Jan-15 8:59am    
I'm not really tracking on what you're saying. Are you asking how to use the same view for 2 separate ActionResults?
Kishore_Kumar 21-Jan-15 8:51am    
Hi,
In Create view, I am fill the details in textboxes, when i click on create button it will insert in table and it will be shown as a gridview format in same (Create) view
SujayC 13-Jan-15 5:25am    
Although not exactly sure what you are looking for....You may use action attributes like HTTPGET and HTTPPOST to filter two actions with same name. One shall be called when its a GET request another one for POST request. With POST request you can save the data, and with GET request you can retrieve the data to same action method.

Hi ,
as you want gridview format records show . then View this url.

Two Way Binding using JavaScript in ASP.NET MVC With Database[^]
 
Share this answer
 
I think you want details as well as create form in same page.

To achieve this you can use partial view. And in your partial view just copy all the contents of your create page and paste it there.

Then render the partial view in your page where you want to see the details.
 
Share this answer
 

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