When I was trying to run the application I had faced this problem. I resolved by selecting the complete object that result will consists of complete customer objects. But before I selected a subset of the customer objects, just two members.
In this example I will show you how to pass integer array from controller to a view. I stored list of numbers in an integer array and index function will return that in a view.
In this example I will show you how to pass string to view mvc in application. The appropriate way to you must cast in to an object and return as view. In view model you must define the object type and write the string in required place.
In this example I will show you how to pass IEnumerable string to view mvc in application. I used string array with array elements contains list of names. I filtered names having length >=5 and assigned to IEnumerable string varable. The appropriate way to pass data from controller to view, is to pass the filterednames to the view
I have created a table “article” with columns articleId and article_content. I am also using html editor for “article_content” column. When I am trying to save I got the following error. It was resolved by adding [AllowHtml] to Description property in class.
In this step by step article describes how to read text file using fileupload control in asp.net MVC.create a post form method with html controls file, button and create a folder name with Document in the project. When user choose the text file and click the submit button the controller will receive file type, name etc. we will save the file in our project document folder.
When I created new table “post” and give foreign key relation to another “category” table after that run the custom tool by right click on edmx file. While running the application I got the following error. It was cleared by including post table foreign key relation to the category class.
In this article we will describe how to share a post along with image in twitter. We can share image with SendTweetWithMedia() method by passing image as stream. Inorder to send image as stream we need to convert it.
The sample code in this article demonstrates share twitter post programmatically. To create a twitter application using Twitter apps and get a customer key (API Key) and customer secret (API key). Inorder to share twitter post we need to Install-Package TweetSharp using nuget package manager console and reference to the page.
In this article we will discuss to pass multiple parameters from Ajax post call in asp.net MVC application. Before I have faced issues with jQuery ajax post call to a controller with multiple parameter due to syntax errors. Now I have found a way by passing JSON stringifyed Object to a [HttpPost] method.