.NET control FreeTextBox method

xiaoxiao2021-03-19  191

1. Add FreEtextBox.dll to the project first.

2. Put - FTB.COLORPICKER.ASPX

- ftb.imagegallery.aspx

- ftb.insertTable.aspx

Copy from the folder Helperscripts, put it outside and - test.aspx (test) the same level directory,

(Don't do this, insert background color, picture, table is not good)

3. Place the images folder into the Test.aspx (Test) to store the uploaded picture.

4. In Test.aspx, add the path to the path

This.fretextBox1.text This is the content of the text you entered in the ftb, this is the HTML tag.

This.fretextBox1.htmlstrippedText This is the text that removes HTML tagged

5. Write into the database

I saw friends on 9CBS how to write FreEtextBox content into the database.

I did it. Just insert all the generated HTML code into a field of the database

Can make a newspaper

news

Field ID (Self-increment) Content Addtime (Getdate)

Private Void Page_Load (Object Sender, System.EventArgs E)

{

// put user code to initialize the page

IF (! ispostback)

{

SqlConnection myconn = new SqlConnection ("Server = (local); database = mm; uid = sa; pwd = 123");

SQLCommand mycmd = new sqlcommand ("Select * from test where id = 2", myconn);

Myconn.open ();

SqlDataReader mydr;

Mydr = mycmd.executeReader ();

mydr.read ();

Response.write (MyDR ["Content"]. TOSTRING ());

Mydr.close ();

MyConn.close ();

}

}

Private void Button1_Click (Object Sender, System.Eventargs E)

{

SqlConnection myconn = new SqlConnection ("Server = (local); database = mm; uid = sa; pwd = 123");

Sqlcommand mycmd = new sqlcommand ("INSERT INTO TEST (CONTENT) VALUES ('" " " "" "" "," MyConn);

Myconn.open ();

Mycmd.executenonquery ();

MyConn.close ();

}

转载请注明原文地址:https://www.9cbs.com/read-130037.html

New Post(0)