Saturday, October 10, 2009

DW-MX makes ASP.NET- revise

Respecting is answered to use Dreamweaver MX to build ASP.NET to develop an environment on, and be in can inspect completely did below the environment data shows and delete the function such as the record.

From the point of the means of implementation, all operations entered DataGrid to accuse in, netizen come to an agreement or understanding is compared is a large plug-in unit, I feel also is pretty figure, of course common plug-in unit can not get the function that it has, continue to say this accuses again below when indication data perhaps says operand is occupied a few in category.

Add modification caption function

DataGrid itself had the function of modification record, need to be installed in the dialog box only.

We are opened below Dreamweaver MX page of previous editorial Default.aspx, turn to the Server Behaviors window below Application, doubleclick " DataGrid(DataGrid1) " accuse (should be called server behavior to just be opposite in MX actually, ah, same cough up) , click " Columns " the plus pushbutton of right, choose the 4th " Edit, update, cancel Buttons " editor pushbutton, the name is a little long, nevertheless it had these functions really.



Playing the setting in the dialog box that give

Title: "Delete " -- the caption of indication row;

Button Type: "Link Button " -- show in order to link a form, you also can choose with " Push Button " pushbutton form shows;

Update Table: "Dbo. Jest is expressed " -- the watch that the need in choosing a database revises

Primary Key: "Serial number " -- main key word

Submit As: "Int " -- the attribute that is serial number field, here is numeric type



After finishing " OK " return, fasten rapid move to shut first accuse a dialog box, you still need to set the field that should revise.

Doubleclick Columns inside the country " caption " one column, accusing the dialog box lieutenant general that give " Read Only " choose diamonds setting to be do not choose, below " Submit As " should choose you to be in the database only the data type of caption correspondence can, it is here " NVarChar " type.


After finishing " OK " return, can decide DataGrid accuses a dialog box now. Good, save file to disk check this modification function.

In the browser now should be the about of next graphs



Click correspondence " Edit " the character of caption column can be replaced with text casing, after then you can alter the written language in text casing, click " Update " , see a result how:



Incorrect, the character is obviously in text casing, how to become " ? ? ? " !

According to netizen Xpilot remind, discover this is the problem on encode. Browsed the documentation of a few ASP.NET, discovery can use ResponseEncoding attribute to request ASP.NET to use UTF-8 encode to send a webpage.

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

In the group of Default.aspx source window, we a ResponseEncoding="gb2312" is medium " Gb2312 " repair instead " UTF-8 "



Save file to disk to check again next. Following plan institute are shown, modification record succeeded.

 

No comments:

Post a Comment