Web-Api 400 BadRequest when search parameter is blank
I am using web-api with mvc4
I am making searching functionality, in some cases like if i filter data
then remove that textbox value and then press search button, need to show
whole listing but in my case showing 400 bad request. as search parameter
is blank, i know if search parameter blank then it will throw 400 error
with web-api.
any one have proper solution then please let me know.
data: "CurrPage=" + JsCurrPage + "&PageSize=" + parseInt(pagesize) +
"&BuildTypeName=" + $("#BuildTypeName").val(),
Here in some cases BuildType is blank. when search made
//controller
public HttpResponseMessage GetBuildTypeList(int CurrPage, int PageSize,
string BuildTypeName)
{
}
No comments:
Post a Comment