Click here to Skip to main content
15,908,112 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have the following scenario, using mvc3: I have a database table which holds a RecordID, RecordName and RecordType. Displayed are three text boxes, one for each of the fields mentioned previously. My Question is, when i enter a RecordID into the relevant text box, i want to be able to show the RecordName and RecordType for that particular RecordID. How can i achieve this?
Posted
Comments
ZurdoDev 5-Jul-12 11:20am    
It will require a lot of code. You'll need to call into a webservice, I recommend using jquery's .ajax call. What have you done so far?
sajan064 6-Jul-12 4:48am    
yes i have doing with the ajax call but unable to render the page ?
Plz help me!!!!!!!!!!!!!

Yu need to use the call back methods either in get or post depending on your context.
This is how you can implement it.
post-and-get-in-mvc-razor-jquery.html[^]
else
loot at step 6 how to use json object to get values and assign to fields.
implementing-consuming-aspnet-web-api.html[^]
 
Share this answer
 
After user enters the RecordID just fire another query to fetch the related details and then read using datareader and then display it in relevant boxes.
 
Share this answer
 
Comments
sajan064 6-Jul-12 1:35am    
i have collect the data using ajax post and how can i display the success: function(result) to a partial view;

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