Latest posts on tagged on "CSharp"

How to create autocomplete textbox with database in asp.net c#?

31 May 2016

In this article we will discuss to create autocomplete textbox using webmethod in asp.net c# application. It provides suggestion in a dropdown menu while the user enters text into the field. Please change the database connection string to connect your database.

A potentially dangerous Request.Form value was detected from the client.

26 May 2016

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.

[Solved] The relationship model was not loaded because the type model is not available.The following information may be useful in resolving the previous error: The required property does not exist on the type model class

25 May 2016

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.

How to share image to twitter post using asp.net MVC?

23 May 2016

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.

How to share twitter post using asp.net MVC c#?

23 May 2016

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.

How to create Enumerations in asp.net c#?

14 May 2016

The purpose of using enumeration is to improve readability by enabling us to use meaningful symbols instead of numeric values. The value of variable is an integer,it is easy to output the name of the symbol rather then its value.

How to create use StringBuilder in asp.net c#?

14 May 2016

StringBuilder is most flexible because it can span multiple statements. The default constructor creates a buffer 16 bytes long, which grows as needed. We can specify an initialize and also maximize size if needed.

How to create and sort array in asp.net c#?

14 May 2016

In c# arrays are declared using square braces and it provides members for working with its contained data. The following code declares an array with some initial data and then sorts the array.

How to convert text to image using asp.net c#?

12 May 2016

In this article we will discuss to convert text to image using System.Drawing namespace. Using Graphics property we can convert text it in to bitmap image and save it the specified loction.

How to bind gridview with json in asp.net c#?

10 May 2016

In this article we will discuss How to bind gridview with json in asp.net c#. On the page load bind the gridview using datatable on the same time use jquery to bind gridview.