Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello friends,

I am having a problem that I want to run some code inside mvc view only when controller return at least one row, mean is should not empty. How can i check this?
Im using custom form in my view.

Can i check this.mvc
Posted
Updated 31-May-10 20:14pm
v2
Comments
Sandeep Mewara 1-Jun-10 2:21am    
Please post some code here. Someone maybe able to help you.

1 solution

can't you check the result and only call the view if you need to otherwise call another view such as

if ( rowcount >= 1) {
return view();
}
else {
RedirectToAction("index");
}
 
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