How to upload and download Media to or from MSSQL Server Database

This code shows you how to upload media files to the SQL Server Database to store it and then how to download it from the Database in your ASP.NET website using C#. First you have to create a database named “MediaDB” in your SQL Server. Then create a table named “MediaTable” in your newly created database. Now create 4 columns in “MediaTable” as given below- ID (int, not null, IsIndentity: Yes) FileName (text, allow nulls) MediaData (varbinary(MAX), allow nulls) Extension (text, allow nulls) Then save all. Now create a new Visual C# type website in your Visual Studio. Here is … Click here to continue…..

Where & When to use asp:LinkButton Control

LinkButton control is a control just like a Button control along with the flexibility to make it look like a Hyperlink.  It implements an anchor <a/> tag that uses only ASP.NET postback mechanism to post the data on the server. Despite being a hyperlink, you can’t specify the target URL. There is no UserSubmitBehavior property like Button control with this control. Its properties like BackColor, ForeColor, BorderColor, BorderStyle, BorderWidth, Height etc. are implemented through style properites of <a/> tag. You can set its Text property either by setting Text properties in the .aspx page or from server side page. (other properties can … Click here to continue…..

Where & When to use asp:Hyperlink Control?

Hyperlink control is used to jump to another location or to execute the script code. When rendered on the page, it implements an anchor <a/> tag. Its properties like BackColor, ForeColor, BorderColor, BorderStyle, BorderWidth, Height etc. are implemented through style properites of <a/> HTML tag. You can set its Text either by setting Text property in the .aspx page or from server side page. (other properties can also be set from both pages) Following are some important properties that are useful. NavigateUrl Used to specify the location to jump to. ImageUrl Used to place an image instead of text as … Click here to continue…..

Where & When to use asp:Button control?

Button control is used to post the form or fire an event either client side or server side. Button control is generally used to post the form or fire an event either client side or server side. When it is rendered on the page, it is generally implemented through <input type=submit> HTML tag. However, if UserSubmitBehavior property is set to false then control will render out as <input type=button>. Its properties like BackColor, ForeColor, BorderColor, BorderStyle, BorderWidth, Height etc. are implemented through style properites of <input> tag. You can set its Text property either by setting Text property in the … Click here to continue…..

Where & When to use asp:ImageButton Control?

ImageButton control is used to post the form or fire an event either client side or server side. Its like a asp:Button control, the only difference is, you have the ability to place your own image as a button. ImageButton control is generally used to post the form or fire an event either client side or server side. When it is rendered on the page, generally it is implemented through <input type=image > HTML tag. There is no UserSubmitBehavior property like Button control with this control. Its properties like BackColor, ForeColor, BorderColor, BorderStyle, BorderWidth, Height etc. are implemented through style … Click here to continue…..