DW-MX Making asp.net-Modification

Source: Internet
Author: User
Tags button type modify net window dreamweaver
ASP.net said last time to use Dreamweaver mx to build ASP. NET development environment, and in the full visual environment to do the data display and delete records and other functions.

From the way it is implemented, all operations are entered in the DataGrid control, some netizens say like is a large plug-in, I think it is also a pretty image, of course, it has the function is not a general plug-in can be, and then continue to say that this control in the display of data or to manipulate the data in several categories.

Add Modify Caption Feature

The DataGrid itself has the ability to modify records by simply setting it in a dialog box.

Open our previously edited Default.aspx page under Dreamweaver MX, go to the Server Behaviors window under Application, and double-click the DataGrid (DATAGRID1) Control (in fact, in MX should be called the server behavior is right, hehe, the same), click on the "Columns" to the right side of the plus button, select the fourth "Edit,update,cancel Buttons" edit button, the name is a bit long, but it does have these features.



In the pop-up dialog box, set the

Title: "Delete"--Displays the title of the column;

Button Type: "link Button"--shown as a link, you can also choose to display as a "Push button" button;

Update table: "dbo. Joke table"--Select the table you want to modify in the database

Primary key: "Serial number"--main keyword

Submit as: "Int"--is the property of the ordinal field, here is the numeric type



When finished "OK" return, do not rush to close the Control dialog box, you also need to set the field to be modified.

Double-click the title column in the Columns field to set the Read only selection box to no selection in the pop-up dialog box, and the following "Submit as" only selects the data type that corresponds to the title in your database, here is the "NVarChar" type.



"OK" returns when finished, and you can now determine the DataGrid Control dialog box. OK, save and test this modification function.

In the browser, it should be the image below.



Click on the corresponding "Edit" title bar text will be replaced by the text box, then you can modify the text box and then click "Update" to see how the results:



No, the text box is clearly written, how all become "???" Out!

According to the Netizen XPilot reminder, found that this is the problem of coding. After browsing through some asp.net documents, you can use the ResponseEncoding property request asp.net to send a Web page using UTF-8 encoding.

Http://chs.gotdotnet.com/quickstart/aspplus/doc/cultureencoding.aspx

In the first line of the Default.aspx source window, we change "gb2312" in responseencoding= "gb2312" to "UTF-8"



Then save and test. As the following illustration shows, the record of the modification was successful.



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.