how to handle this type of things. using asp.net mvc

Posted by kumar on Stack Overflow See other posts from Stack Overflow or by kumar
Published on 2010-05-22T03:31:18Z Indexed on 2010/05/22 3:40 UTC
Read the original article Hit count: 282

Filed under:
|

hello friends,

i have

public jsonresult update(studentinfo s)
{

  for(i=0;i>0;i++)
  {
     var x = // i am getting some x so i am checking again 

     if( x != null)
      {
        var updateuser = student.update(s.student,"","");
        **return json(updateuser.ToString());** // if i keep it here i am getting exceptoin  saying not all code paths return value bec this return i can not keep it out for loop bec each and evary updateuser i need to return json..
      }
  }

}

how to overcome this type of things? thanks

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about asp.net-mvc