.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

HTMLeditor : Store contents in database

Posted By:      Posted Date: September 28, 2010    Points: 0   Category :ASP.Net

I want to store the contents of HTMLeditor into a table, But when I retreive the data into a GridView Control , it gives me unformatted text, it gives me the html code as well. I want all the formattings to be there which I made in HTMLeditor.

I tried using :

  Dim editor As String = EditorCompDesc.Content
            cmd.Parameters("@compDesc").Value = editor

I even tried to store the contents into a label and then into a table, But it gives me html code which I don't want.

View Complete Post

More Related Resource Links

Store and Display Images from MS Access Database Using C#

There is only the difference of coding syntax to stream the binary data of image content type to upload it into MS Access Database using C#/VB in ASP.Net 2.0

Namespaces required:-
using System.Data.OleDb;

OleDb is used to connect the web site forms with MS Access Database using Microsoft.Jet.OLEDB.4.0

Is there a way to backup all my store procedures under a particular SQL 2005 database?

hi all, Is there a script, doc, VBS script, SQL statement out there which will read all my store procedures and save them as a TXT file? Currently I have to save all of them in text files before I update them when I get a new web site release. Thank you  JCD

how check username and password store in database

hi i have login page. how check username and password store in database . plz reply with code.i did it by form authentication b ut it not work.

What's the best way to store Data from DataBase like XmlNode... Application vs Cache


 Hello, i am building an N-tier application now i want to store Data(like XmlNode) that is common to all users ..

now i thought using Application to hold the data but my data lays in the BLL tier which is an Class Library project and i can't store any datain there for example :

HttpApplication MyApp=new HttpApplication();



My question is what is the best way to store Data (not small data like user name etc..) is it Application? orCache?

i would like a small example within a ClassLibrary project...


How to read PDF using Asp.net(C#.net) and store values in Database


Dear All,

Please try to guide me how to achieve this one. my application need to do reading the PDF document and want to store the values in Database.

Actually what happens is my customers sends me the OCR scanned copied in the form of PDF file. i need to read those scanned pdf files and store the customer information into my  table.

please try to help me how to do this..

Thanking uou,



Store file into database


Below is the code I use to store file into database but there are a few problems.

1. couldn't store file larger than 4mb

2. couldn't store doc,docx,xlsx but only .txt

my table column are:

id - int

file_data - varbinary(max)

name - varchar(max)

content_type - varchar(50)

file_size - int

can anybody help me in solving this?thx

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        If Upload.HasFile AndAlso Upload.PostedFile IsNot Nothing Then
            Dim ilength As Integer = Convert.ToInt32(Upload.PostedFile.InputStream.Length)
            Dim content As String = Upload.PostedFile.ContentType
            Dim file_name As String = Upload.PostedFile.FileName.Trim()
            Dim bytecontent As [Byte]() = New [Byte](ilength - 1) {}

            Dim connection As New SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirector

Store file into database


the following are the code I used to store file into database but it doesnt work.

so pls somebody help me in this problem.


Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim connection As New SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True")
        ' Read the file and convert it to Byte Array
        Dim filePath As String = FileUpload1.PostedFile.FileName.ToString
        Dim filename As String = Path.GetFileName(filePath)
        Dim fs As FileStream = New FileStream(filePath, FileMode.Open, FileAccess.Read)
        Dim br As BinaryReader = New BinaryReader(fs)
        Dim bytes As Byte() = br.ReadBytes(Convert.ToInt32(fs.Length))

        'insert the file into database
        Dim strQuery As Str

store remotely posted data to database


I am writing an application in which a remote url web site ( says url1 that is sender) sends xml data to another web site (says url2 that is receiver) by using .NET WebRequest. On the receiver url2 if I use .NET Page.Response and .NET Page.Request to store posted/received xml data into an external text file, then the data is stored. However, if I store the received data into database, I do not see the data is stored into the database.

Please help me to trouble shoot the codes so I can store such remotely posted data into database on the receiver side url2. Thank you.

I host both url1 site and url2 site in my computer using IIS like http://localhost/url1/sender.aspx  and http://localhost/url2/receiver.aspx

1/ Receiver page's codes that store remotely posted xml data into database do not work:

protected void Page_Load(object sender, EventArgs e)
            Page.Response.ContentType = "text/xml";


Custom database function cannot be translated into a LINQ to Entities store expression



I'm trying to get a UDF from my SQL Server database to map to Linq to Entities. I've found an example for the CourseManager sample in the MSDN :




Sub Button1_Click(

Search in all the store procedure at database level


Hi All,

We have couple of tables with prefix as "TEMP, something like this:-


We are assuming this temp tables are been created inside the store procedure t-sql and by mistake developer's hasn't writing drop table statement at the end of the sp.

So we need to figure out which sp procedure is using above mentioned tables?

Can anybody help me how to search for sp t-sql statement all together at database level?



How to Create a Database in Remote computer from a store procedure?


Dear frdz ,


I have to create database in remote computer dynamically from TSQL.



Actually my requirement from a store procedure I have to create database in remote server.   Here remote server is dynamic…


I have all the TSQL statement for creating table & store procedure.


What is the best method for doing this?


Best way to store database data on webpages


Whats the best way to store data from database, if you are planning to retieve all needed that once from d database only once, when the page is loaded for the first time. is arrays appropriate or is the better storage methods. dude to lack of speed. we have decided to only  get all data from the database once and store them on arrays then only interate with the database when inserting, deleteing and updating.  I'm using visual studio 2008 , coding on c# and using asp.net mysql connector. what other storage methods can work to my advantage on this?

Copying contents of table from one SQL CE database to another



I'm trying to copy an entire table's content from one SQL CE database to another. I would use sequential INSERT statements (read from the original table, then insert the results into the destination table) except for the fact that I don't know if they indexes from the primary keys would match, and I need them to match.

I'm programming this in C#, in case this helps.

C#: How to store real-time updating measurements in a database (C#)

I have real-time updating measurements (for each second some new values).

Task: I have to store these real-time updating measurements in a database.

Question: Since I am working with C#, I have 2 basic questions:
(1) How to store real-time updating values in C# (within in database framework)?
(2) Should I use MySQL as database?

Thanks in advance,

How to upload a file to web server in asp.net and store file path into database table?

This article describe how to upload a file into web server folder using asp.net file upload control and store the file information into sql server database.

How to store and retrieve images from SQL server database using asp.net?

In this article, I will show you how to store images into sql server table and display in gridview control in the page using asp.net and sql server stored procedure.

Multiple database support with Entity Framework

One of the features introduced in Entity Framework is being database independent. Which mean each database provider can support Entity Framework by implementing its provider.

This feature allows you build applications independent from the underplaying database provider. In this post I'm going to show how to build an application that support multiple databases using same conceptual model made by Entity Framework.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend