Monday, October 12, 2009

Dreamweaver MX 2004 skill of a word

1, from inside exterior documentation stickup when, if do not want its form, want a written language only, can use " Edit->paste As Text " command, and not direct Ctrl+V.

2, " Command->Add/Remove Netscape Resize Fix " it is a very useful command, when it can make browse a page in NC4.0, when changing window size, the page won't be spent.

3, all Head elements cannot make library component, all elements are in by Insert Library when, its Head associated attribute by take out, be like attribute of Style, CSS.

4, Library component and Template pattern plate need not upload a server, can preview the page that used this component or pattern plate correctly.

5, use " Check Plugin " whether does browser of the person that Behavior will define a visit install Flash plug-in unit, can judge error occasionally, installed plug-in unit to report however obviously for instance without installation. It is clear to had better be installed inside the Publish of Flash, is not simple output becomes.swf document.

6, do not be in same at the same time use form and layer come to a page decorate, the disorder is caused in the meeting in Netscape, appurtenant relation except.

7, use layer when best definition is Div label and not be Layer, because former there is very good compatibility in browser of two kinds of mainstreams.

8, when using a picture to make the link that heat up an area, had better name to hot area, prevent to be able to be drawn on the picture only sometimes linear.

9, after building frame structure when us, can arrange file of this frame body and Site window system place, procrastinate from file of webpage of the choice in Site next in putting corresponding framework. This applies to frame to compare complex page.

10, if be opposite a piece of picture is dissatisfactory, think another piece to change, the simplest method doubleclicks this picture, the picture that direct choice should replace can.

11, had better save first before previewing a webpage, be in occasionally cannot preview a webpage correctly, and put may solve this problem.

12, if your page is medium,be Java Applet, had better not use " File->convert->3.0 Browser Compatible " command, the definition that because this chooses,can not meet all 3 browsers efface. The most terrible is we do not know what Dreamweaver did after all in this process, specific happening those change. And should remind you, when executing this operation to a batch of pages, must back up first, can do not have a place to buy otherwise regret medicine.

13, the form unit that does not have any content won't be shown in NC come, can insert transparent Gif to solve this problem at this moment.

14, Design Note can be called in the Dreamweaver of this locality only, and the person that the webpage is browsed downloads this page to cannot see this one annotate however. If you hope others also can see, can use Comment function.

15, use " Hide/show Layer " after Behavior, if there is individual graph layer to cannot show in Netscape,come out, this graph layer can be expunged in Dreamweaver, again redefine it, everything is normal.

16, the characteristic of form is only the content of whole form is come down to just be met by browser Down entirely one-time show, the thing is so too much inside form, the browser should spend a long time to download and content may be done not have from beginning to end on screen. If table is too long, or nest, or is divided into a few form to show in order to accelerate. Had better be in form in fore-and-aft departure, for instance so 3 3 form, its instead 3 a 3 form.

17, do not put a layer inside form unit as far as possible, put form to be no problem basically inside the layer nevertheless.

In DreamWeaver applied CSS style expresses skill two

One, purify is super the underline of the link and on super link implementation mouse hovers become angry:
  
Below acquiescent circumstance, the super link in the webpage that designs with DreamWeaver has underline, look not quite beautiful. Want the underline that these are fed up with purify, the method of a lot of the press introductions is manual in HTML source code join a paragraph of code, the underline that actually very easy in DreamWeave purify links. Establish a link casually in the Document Windows of DreamWeaver above all, you can see this link can have underline. How purify Where is this underline?
  
1. In the "Text" that clicks menu column to go up | "CSS Styles" | "Edit Style Sheet... "(perhaps presses shortcut key Ctrl+shift+E) directly, v Edit Style Sheet (editor style is expressed) dialog box window.
  
2. Click "New (to build) " , be in next "New Style (new form) in " dialog box, click pushbutton of "Use CSS Selector " .
  
3. A is keyed in in Selector column, nod OK next.
  
4. Play a "CSS style to define " dialog box subsequently, in Type kind Decoration(is decorated) in, tick off choose None, nod OK next, nod Done again. You had disappeared the underline that discovers a link in Document Windows immediately. So how to come true to hover when the mouse again does in the link the link when going up become angry? In repeating afore-mentioned measure the first, the 2nd pace. Nod next anthology by Selector next pulling arrowhead, choose "a:hOver" , nod OK again. Playing the "Style Definition For A that go out subsequently: In Hover" dialog box, in Type kind the random in Color chooses a kind of color (the choice is for instance gules) , nod OK next, nodded Done to be finished again. Preview by F12, put the mouse on the link, did this link become red? If be in a moment ago "Style Definition For A: In Hover" dialog box, in Backgroud (setting) kind in, the color that chooses Backgroud is green, so when putting the mouse on super link when you, not only the link can become red, and still meet viridescent setting. In fact, define a dialog box through a moment ago CSS style, you still can achieve more special effects, the friend that have fun at mights as well go considering well.
  
2, found the list of exterior CSS style that can use repeatedly
  
After using DreamWeaver to establish pattern of a kind of CSS in some webpage, if you want to use this type in another webpages, you need not establish this CSS pattern anew, wanted you to found exterior CSS style to express a file only (External CSS Style Sheet) , you will call this style to express the style in the file arbitrarily henceforth. Manage to facilitate, in folder of preexistence site place, build a folder, entitle CSS, use technically at placing exterior style to express a file (its expand the name is Css) .
  
1, Ctrl+shift+E is pressed in Docu ment Window, v Edit Style Sheet (editor style is expressed) dialog box window
  
2, click "link" .
  
3, playing the Link External Style Sheet(that go out to link exterior style to express) dialog box, dot BROWSE, find the CSS folder that a moment ago founded.
  
4, in Select Stylesheet File (choice style expresses a file) name of window " file in " column, key in *.css (* to be able to be aleatoric name) , ask an attention, be right now in fact in CSS folder and express a file without the style, in " file name the new name that keys in in " column will become exterior style to express the name of new document. Key in Title.css for instance, , nod Select next | OK.
  
5, in Edit Style Sheet (editor style is expressed) in dialog box window, the meeting is new increase Title.css (link) , doubleclick it.
  
6, in playing the "title.css" window that give, dot "New" .
  
7, in "New Style" dialog box, the d ot chooses pushbutton of "Make Custom Style (class)"
  
8, a certain name is keyed in in Name column, be like Myheadline, dot OK.
  
9, be in next in dialog box of "Style Definition For.myheadline In Title.css" , have all sorts of settings such as font, color, OK is nodded after finishing. If found new form even, nod "New" again, repeat a moment ago measure 6, 7, 8, 9, nod "save" finally | "Done" , then file of watch of this exterior style has founded Title.css. The "TEXT" on menu column | "CSS Styles" child menu lieutenant general will be listed all styles in Title.css. If want to call this Title.css in other webpage, need to repeat only afore-mentioned 1 to 3 paces, be in next name of file of " of window of Select Stylesheet File inputs Title.css in " column. Nod "select" | "Ok" | "Done" , all styles in Title.css can appear in the "Text" on column of this webpage menu | "CSS Styles" child in menu, you will be OK these types use in the webpage here.

Of DreamweaverMX skill exceed a link

Be in before the course after the operation of a few parts, our webpage has pursued Wen Bingmao, have the effect that comparative, but this is insufficient still to the webpage, for the website medium numerous webpage can make an organic whole, must rise each webpages through exceeding link means to contact, the person that such ability let browse quite jumps between different page turn.

One, link picture and character

For a few characters or the picture establishs a link very convenient, the picture that should need to become a link with mouse pitch on only or character, be in next of attribute face plate " Link " the input in inputting casing needs to jump the target page address that turn, perhaps press the folder icon on the side of input casing will choose to need to jump the file that turn. Besides, dreamweaver MX 2004 still provided a kind of means that will link a file quickly through website window.

The first pace: Move above all " Site → Manage Sites " command, and select a site that has founded from inside playing a menu, can see in right ministry right now play the site management window that give.

The 2nd pace: The character in editing an area to choose or picture, procrastinate directly in dragging attribute face plate " Link " the icon of circular mark target on the side of input casing, will appear at this moment an arrowhead, point to website management when arrowhead implement when medium certain file, a pane can appear all round the file (if pursue 1) .


Graph 1

The 3rd pace: After loose mouse, the literal bottom of pitch on can give now to underline, at the same time the color of the word becomes blue, and " Link " the also can show target file automatically address in inputting casing.

Clew: When establishing a link need notices two kinds of pattern of URL. 1. Absolutely address: For example Www. Abc. Com/test. Htm; 2. Relative to the address: For instance Download/1. Htm, show a page 1. Htm is in the root catalog of the server.

2, in the set on a piece of picture many links

Some webpages became many links on one magnify picture, the person that visit so can pass the different position that clicks a picture to enter different page, this is the concept that applied image to heat up area, we can consult undermentioned measure comes true.

The first pace: OK in Dreamweaver MX 2004 first pitch on image, can see on image attribute face plate right now " Map " area, in its lower part has the tool icon of 3 baby blue, namely rectangular, circle and polygon.


The 2nd pace: The basis needs a among them to use mouse pitch on, move the mouse to image to pull the area that drags a baby blue again.

The 3rd pace: In attribute face plate " Link " in inputting casing, fill in the webpage address that needs a link, a such image heat up area to had been done.

Same, again to this image set many image heat up area, also can realize the different area that clicks a picture to enter different page.

3, the link that turn jumps inside custom-built page

If you often are in,free electronic magazine subscribes to on the net, the page that perhaps browses train in excess specified length should be linked to this kind of label not unfamiliar, this is to pass the list of a similar list to jump conveniently turn to any parts inside the page.

The first pace: Link the position that point to certainly first in Dreamweaver MX 2004, namely screen jumps the position that after turning, keeps, catch text version of pitch on target and move " Insert → Named Anchor " command.

The 2nd pace: In " Anchor Name " label name is keyed in in inputting casing (for instance Test3) , can appear automatically below text at this moment number of an anchorage type will distinguish common text content (if pursue 2) .


Graph 2

The 3rd pace: Be in of attribute board " Link " the input in inputting casing " #test3 " , among them the name that Test3 a moment ago installed namely, can jump inside implementation page so turn function.

Clew: If think a certain position in pointing to additionally one page is OK also, let off mark of this anchorage type go going.

4, link of fast examination webpage

Online surf when, most those who be fed up with is to see " Web Server Error 4004:FIle Not Found " of and so on make mistake information. Because a website is medium link amount is very much, have a bit can not bring about a lot of links to make mistake very, OK in Dreamweaver MX 2004 nevertheless very undertake checking to the link conveniently.

The first pace: Move in Dreamweaver MX 2004 " Site → Check Links SideWide " command, will activation right now the link checks face plate.

The 2nd pace: From face plate left upside " Show " next pulling Broken Links can choose in menu (broken link) , Extrenal Links (external link) , OrphanedFiles (isolated file) 3 kinds, after for instance we choose Orphaned Files, dreamweaver MX 2004 will undertake checking to linking a circumstance currently, and will isolated file list shows come out.

The 3rd pace: To having the file of the problem, doubleclick mouse Zun Jian to be able to be opened directly undertake modification.

Clew: Exterior link is the link address that links exterior website, dreamweaver cannot undertake checking to its validity.

When establishing a link for the webpage need reminds everybody to must take care all the more, because the website has hundreds page normally, a bit not careful the condition that can cause empty link to perhaps link a mistake, but this pair of your website figure have very bad effect oh!

Revise register a watch to solve Dreamweaver chaos to pile up a problem

Random code appears in Dreamweaver, it is two kinds of circumstances roughly:

It is to did not indicate the written language that the homepage place that make uses, this kind of circumstance falls to be able to be solved very simply, caption can.

2 it is you are added newly held form of a written or printed character, (and so on of font of cruel of vessel of such as article) , such you build a webpage every time, want to be adjusted, very troublesome. So you can be solved with the method below.

Back up first please register a watch, exit the Dreamweaver in moving.

1. Moving Regedit.exe.

2. Find HKEY_CURRENT_USER/SOFTWARE/MACROMEDIA/DREAMWEAVER 4/FONT PREFERENCES

Have 2 plan next:

Simple plan:

Doubleclick Number Encodings, change numeric B into C(decimal 11 change 12); to exit Regedit, enter Dreamweaver, you choose PROPOTIOANL with respect to OK and optional ground now, FIXED FONT, the font of CODE INSPECTOR and literal size!

Perfect plan:

Why is simple plan insufficient still? Because do afore-mentioned altering only, can choose Chinese style only, and below some circumstances, experience of word of a few English is more interesting than Chinese font (for instance I choose ARIAL style inside CODE INSPECTOR, the body that compare the Song Dynasty, imitation Song-Dynasty-style typeface of what want much more good-looking) , and also can show correctly to Chinese part.

The method is as follows:

Below HKEY_CURRENT_USER/SOFTWARE/MACROMEDIA/DREAMWEAVER 4/FONT PREFERENCES, doubleclick Number Encodings, change numeric B into C(decimal 11 change 12); to enter CharEncoding_11, undertake modification to in-house numerical value:

The attention had better alter only the following value:

Fixed Name: Naevus Wu 

Fixed Size: Naevus delay Ze

HTML Inspector Font: Naevus Wu 

HTML Inspector Font Size: Naevus delay Ze

Proportional Name: Naevus Wu 

Proportional Size: Naevus delay Ze

If feel dissatisfactory, also can try: FIxed CharSet, Proportional CharSet, Windows Character Set from 134 86(is decimal, express Chinese) change 00(to represent English) .

To simple plan, here still has a simpler implementation method, duplicate the following code come down, save become suffixal the file that is.reg (should notice to must be) of simple text means, carry out this Reg file next, revise can finish automatically (also back up first please register watch) .

REGEDIT4 [HKEY_CURRENT_USER\Software\Macromedia\Dreamweaver 4\Font Preferences] "Number Encodings"=dword:0000000c"Default Encoding"=dword:00000005

Dreamweaver makes form of fine foul line quickly

Author: Gu Yanying

A form is inserted in Dreamweaver, if install its " frame (Border) " for 1, its frame wire is thicker when previewing. To not be familiar with the webpage fabricant of HTML language, how to make the form that makes fine foul line quickly? Below, I give everybody introduction a little skill- - make form of fine foul line with setting color and span opportunely.
 
It is in order to make a line of 4 3 row, frame for the form of gules filament exemple:

Step 1 inserts in the design view of Dreamweaver 4 3 form.

Step 2 is in " attribute " the attribute that this table sets in face plate is as follows: The edge is apart from (CellPad) is worth according to needing to be installed by oneself (for example 10) ; Span (CellSpace) is 1; Frame (Border) is 0; Setting color (Bg Color) is red.

Step 3 pitch on all unit case of this form, in " attribute " the attribute that all unit standard set in face plate is as follows: Setting color (Bg) is the other facial expression beyond white or red.

Finally, save a webpage, preview by F12. How, do 4 3 gules filament form appear before you?

Additional, if our as usual wants to come with form,layout locates, but line of the frame outside wanting only shows for filament, and the result that the disjunctive line of in-house and unit case does not show, can cooperate to use nest form. Gules filament is with line of the frame outside form below for exemple will show operation method:

Step 1 inserts in the design view of Dreamweaver a 1 form.

Step 2 is in " attribute " the attribute that face plate sets this table is as follows: "The edge is apart from " install according to needing proper motion (for example 5) ; "Span " for 1; "Frame " for 0; "Setting color " for red.

Step 3 pitch on the unit case with this only form, be in " attribute " face plate sets this unit standard " setting color " for the other facial expression beyond white or red.

Step 4 is cursor fixed position in these 1 1 form, insert according to need a few a few nest form, of this nest form " frame " proper setting is 0, "The edge is apart from " and " span " can be installed according to need or do not install, other property can not undertake installing.

Such, we can be in the different unit of nest form inserts the other webpage element such as character, picture inside case.

Whether to his mind disturbed a bit? Try at once!

Dreamweaver is convenient skill method

  1. Use a type neatly 

The netizen that familiar webpage designs knows, the method that calls Style is very much, we can click mouse right key to choose Custon Style to call Style level, right key also can be clicked to call Style on the elemental list in condition column. Although different method is achieved the effect looks like be like, but the HTML code that generates actually differs completely. Call Style level for instance with Custon Style, generate in webpage code < Span > label, such label more than 1 can make file very overstaffed and the analytic rate that affects a browser, so we should use the elemental list in condition column to call Style as far as possible.

2. Use Format Table order alive 

In complex webpage design, the application of form is most, the specific place that because use form to be able to dominate text and picture freely,appears on the webpage, make whole webpage looks thereby compact and unified. Dreamweaver also unwillings to lag behind in this respect, we can be used among them " Format Table " (the format turns table) the command comes the form that apace has designed beforehand to form application. Want to use the type that has devised beforehand, first the random cursor park form inside an unit case, reelection choose " Command " → " Format Table " command, in the dialog box that appears subsequently, from inside left list the choice devises plan. By " Apply " key will examine the effect, if dissatisfactory word, still can be installed afresh or revise the cost of partial parameter, be like attrib border degree of finish, setting color is waited a moment.  

3. At the same time catenary receives two webpages 

We know super link can connect a page only. If we want to open documentation in different frame page, can use " Go To URL " JavaScript behavior. Open a webpage that has frame, choose character or picture, choose from inside behavior face plate next " Go To URL " . We can notice Dreamweaver can be in " Go To URL " all practicable frame shows in the dialog box. After a framework that we consider to link inputs corresponding URL, the choice chooses another frame again among them and input another URL.  

4. Do not have Chinese name to the file 

Everybody is in after making a webpage, connect regular meeting to remove have representative Chinese name to the webpage, will can make the person looks file name to be able to understand the content that file place contains probably, 2 will can go to the lavatory the photograph intermodulation between each super links is used. But if you are in such doing in Dreamweaver, can discovering Dreamweaver supports Chinese file name is not too good, happen via often can the page calls incorrect phenomenon, when so we save a webpage in 贒 Reamweaver later, use English as far as possible or the number regards a file as the name, can avoid so above make mistake phenomenon.  
 
  5. Resolution of clever setting font 

We are in the webpage that make when, often have this kind of experience, the webpage that has made namely then is very normal when be browsed on this locality computer, but discover when be browsed on a computer originally beautiful webpage becomes askew, is this why? So the resolution of each computers should make your homepage falls to be able to show normally in different resolution, better settlement got in Dreamweaver. In documentation window right next horn, dreamweaver shows the resolution size that current documentation is become by the design. Click which number, the page that can feel current in playing menu giving form appoints indication resolution, can make through revising your homepage provides flexibility more. Make differ the monitor of resolution can better land shows.  

6. Clever conceal label 

When if be in the webpage,inserting sightless element, dreamweaver can add automatically on the page to it corresponding elemental label, in order to facilitate we choose sightless element. But this is not a favour completely, for instance we have the group in very multilayer page to insert a form in, arranged too much layer element label as a result of first with respect to meeting discovery and make form automatic fall back on the 2nd of the page, although do not affect the result when browse, but this is met really block up our job. Feel when us label of a certain element is hinderous so when, simply will screen is dropped. The method is to press Ctrl+U to open Preferences face plate, in Invisibel Elements of the pitch on in Category, will appear in the right of face plate all elemental label. Want to drop the scratch out before the elemental label that does not need only, it is met with respect to guarantee against after reappear.  

7. Be apt to is used procrastinate put skill 

When we are using Dreamweaver to edit a webpage, often need to insert a few image of what, the image that should insert suppose is very much, will operate according to groovy method appear very troublesome. We can be used procrastinate put skill to solve this problem well. Above all we turn the operation window of Dreamweaver into mobile window, will in order to vacate a space show Explorer window, after finding the image document that should insert, pull them with the mouse one by one the proper position that uses a webpage, dreamweaver will be automatic in the HTML code that adds the Url of these image to the file, of course the file that the image file that here asks to be procrastinated to move must be the Web image format such as Gif, Jpg. To been in the image in the webpage also is same, procrastinate directly it is OK to come over. But there is super link on the image that if be pulled,uses, cannot procrastinate with reuse use a technology, what because procrastinat e in those days,come over is super link address merely.  

8. Automatic setting updates time 

We know a webpage wants to obtain more turning round that lead, one one very important should be updated ceaselessly namely. But to us for these individual webpages, should be afraid newlier in time every day is not very easy thing. Accordingly, we hope the webpage can be updated automatically, the author offers a source code that can update modification time automatically below, we should add this paragraph of source code only...</ the goal that replaces time can achieve between BODY> :  
<Script Language="JavaScript "></ Style> ; 2 it is to use a mouse ordinal the Text/Custom Style/Edit/Style Sheet/New/Redefine HTML Tag in clicking Dreamweaver, choose A from which, it is next in Decoration pitch on None, click finally succeeded certainly.  

12. Clever and duplicate character 

The character duplicates each other among the applied process that differs in a few, it is the thing that we want possibly in real work to often be done. But, when if we duplicate from inside Dreamweaver,editing the character in the area to use a program to another, HTML code and character will be duplicated to go together, so we this how does ability duplicate the character in editing an area only come down? We know, when duplicating normally, be operated with shortcut key Ctrl - C, if we press key of a C more when duplicate, so Dreamweaver will be met only the character of duplicate pitch on.

  13. Be apt to uses shortcut key 

To improve the efficiency of the operation, we can use shortcut key in Dreamweaver, use Ctrl-B or Ctrl-I to be literal application boldface or inclined constitution type for example, the text that also can make shortcut key of below in order to a few clavier will be pitch on uses HTML form: Ctrl-0: Without Ctrl-T of format     : Ctrl-1 of paragraph     : Ctrl-2 of   of caption 1: Caption 2 Ctrl-3: Ctrl-4 of   of   of caption 3: Ctrl-5 of   of   of caption 4: Ctrl-6 of   of   of caption 5: Caption 6 

14. Shut a webpage automatically 

If we hope our webpage can be shut automatically inside designation time, might as well following code join at the back of the label in webpage source code: <Script LANGUAGE="JavaScript "></ Script> Among them in code 3000 express 3 seconds, it is an unit with millisecond.  

15. Name of clever setting object 

When we are using Dreamweaver to make very mixed effect, possible need often uses certain repeatedly or many objects, for example we often need fixed position a certain specific form, image, if if we do not have certain webpage,medium many objects name, so in repeat when using these targets, the likelihood is very troublesome make mistake easily perhaps. Call these boy or girl friends to can go to the lavatory, we should establish a new target in every when, remember taking to have the name of representative and easier memory to it. When naming to these objects, we can pass a boy or girl friend " attribute " face plate will operate went.  

16. For image the link adds dynamic effect 

Sometimes we achieve a kind of clear result to want, when hope mouse shift arrives on a certain link, can have use feeling generation. Use Dreamweaver can achieve this kind of result very easily. When the design, we need to prepare two image above all, the first is primitive image, the 2nd is the image after mouse shift goes up. Click the first graph with the mouse then, the link in attribute face plate is filled in column on the document that wants a link, click the F8 on clavier to bolt next, click in playing the Behaviors window that give " + " date, choose subsequently " Swap Image " , the 2nd picture chooses in the window that appears then, click finally it is OK to decide.

Dreamweaver compose builds memoir of Blog whole journey (12)- uploads installation

Dozenth chapter Upload Doking's BLOG to long-range space

It is normal to arrive to make Doking's BLOG program uploads after long-range space move, point of a few installation introduces below.

1. The Doking's BLOG program that this tutorial offers is with site root catalog is given priority to, because want to use Web.config to configure catalog of file, Bin and Aspnet_client script library, program of card of experience of data set of the ability below the root list that these 3 files and catalog must put in the site, window moves normally.

2. Catalog of the source program file of this tutorial and Web.config configuration file, Bin and Aspnet_client script library are put in same catalog, position of these 3 files is not kinetic, if think the secondary level directory that puts Doking's BLOG page below root catalog is medium, for instance such:

Http://localhost/dkblog/

Above in the address, dkblog list sets file of Doking's BLOG page, besides Web.config catalog of configuration file, Bin and Aspnet_client script library upload root catalog China and foreign countries, other is all the file can duplicate in Dkblog catalog.

3. Because Dreamweaver MX deposits the string of join database in Web.config configuration file, open Web.config to configure a file, if graph 12-1 red encircles place to show,can seeing is a database the physical method in this locality.

Graph 12-1 Web.config configures document part content

Because upload long-range space, its physics method is common won't the physical way of this locality is same. The server variable that also cannot use and so on of such as Server.MapPath in Web.config configuration file will get the database physics way of long-range space.

Can get a database to be in through coming with lower part law the method of true list physics of long-range main engine. Assume, be as follows in the domain name address that uploads long-range space:

Http://www.pconline.com.cn/dkblog

Visit the Dkblog of secondary level directory of long-range and fictitious lead plane through the fictitious address above, database file protects existence Dat folder in, accordingly actual and fictitious address is: Http://www.pconline.com.cn/dkblog/dat

Dynamic page of ASP.NET VB of a blank is built in Dreamweaver, switch arrives code view, input following code:

<%=server.MapPath("") %>

Save for Dkurl.aspx, browse in IE, if pursue,as a result 12-2 place is shown.

Graph 12-2 Test physical way

The physical way that can see Dkurl.aspx is in is: D\dkblog\ , the physical way nature of that database is: D:\Dkblog\dat\dkblog.mdb.

After the physical way that gets long-range leader, open Web.config to configure a file, the physical method of modification database.

Remind: Come here Doking ' the program development of S BLOG already was finished. This procedure is very simple, but be helpful for abecedarian developing a database. The BLOG program that uses actually actually very complex, a lot of skill remain the reader goes thoughtful with research.

Dreamweaver compose builds memoir of Blog whole journey (the search inside 11)- station

Eleventh chapter The implementation that searchs inside Doking's BLOG station

Often see a lot of websites have function of the search inside a station, how is this to come true? If be ASP, that Dreamweaver can come true very quickly. Now is ASP.NET, a little the hand is made up.

11.1 Skill of SELECT advanced search

Learn paragraphicly above the course, to SELECT how many meeting nods understanding. Skill of SELECT advanced search, whats don't have actually mysterious, basically apply with what mode matchs operation accord with about. So here basically explains what mode matchs operation accord with to apply.

Mode matchs LIKE of operation accord with, NOT LIKE commonly used search at faintness, it judges a value to whether match with designation string format photograph. LIKE is used at searching to match the record of certain condition, NOT LIKE is used at searching not to match the record that appoints a condition. Can use at the type inquiry such as string, text, date.

1. 100 semicolon % : Can match the character of aleatoric type and length.

For example: LIKE of caption of WHERE of watch of note of study of FROM of SELECT study note " network % "

This inquiry is the caption in wanting inquiry study note to express with " network " all begun study take notes, be like: Network database ASP was passed, network and research of development of mobile phone communication.

For example: LIKE of caption of WHERE of watch of note of study of FROM of SELECT study note " %ASP.NET% "
This inquiry is to should inquire all caption were included " ASP.NET " study takes notes.

2. Underline _ : Match individual and aleatoric character, commonly used the character length that will restrict expression.

For example: LIKE of caption of WHERE of watch of note of study of FROM of SELECT study note " V_ develops concentration "
This inquiry basically is inquiry is similar to " VB development is handpick " , " VC development is handpick " the study of such caption takes notes.

3. In bracket [] : Appoint a character, string or limits, requirement place matched pair resembles the anyone that is them.

11.2 Functional implementation is searched inside the station

After introducing skill of SELECT advanced search, will introduce the implementation that the function searchs inside the station. 100 semicolon were used only here % mode match operation accord with.

(1) open pattern plate Dkblog.dwt.aspx, insert watch sheet, set ID= " Gofrm " , movement for " . . / Dkgo.aspx " , the method is " POST " ; Insert text casing, set ID= " Dkgotxt " ; Thrust button " search " , if pursue,as a result 11-1 place is shown.
(2) save pattern plate Dkblog.dwt.aspx to update all webpages.
(3) build dynamic page of a blank ASP.NET VB, save for Dkgo.aspx. Add data set Ztre, if graph 11-2 place is shown,its are installed.

Graph 11-1 Add concerned watch sheet to accuse

Graph 11-2 Add data set Ztre

(4) click " advanced " pushbutton, SQL command:

SELECT * FROM ZT ORDER BY ZITIME DESC

Instead:

SELECT * FROM ZT WHERE ZTNAME LIKE '%"+Request.Form("dkgotxt")+"%' ORDER BY ZITIME DESC

If pursue,as a result 11-3 place is shown.

Graph 11-3 undertakes modification to data set Ztre

(5) undertake concerned designing to Dkgo.aspx page, bind arrive about dynamic text surely in the page, design main area, if pursue,as a result 11-4 place is shown.

Graph 11-3 To the page setting of Dkgo.aspx

About the setting detail can consult the concerned setting of Index.aspx.

Dreamweaver compose builds memoir of Blog whole journey (10) : Collection  bursts

The 10th chapter The implementation of BLOG incident calendar

  Since Doking ' S BLOG is study note, so it is OK to press calendar fish is all note and note reply.

Difficulty analysis: Should add Calendar calendar to accuse directly in pattern plate? Not! That is no good! Because Calendar calendar accuses it is the server accuses, should be in contain Runat="server" to express sheet this server accuses, but there can be to contain Runat="server" to express sheet only in one page, the mistake that if graph 10-1 place is shown,can appear sometimes otherwise shows.

Graph 10-1 The page can have an error that contains Runat="server" to express sheet only

How does that do? It is to adopt here embedded frame undertakes transferring.

10.1 Add Calendar calendar to accuse

(1) build dynamic page of a blank ASP.NET VB.

(2) insert take a Runat="server" to express sheet, install ID= " Calfrm " .

(3) those who click ASP.NET quick menu to fall " more label " pushbutton, playing piece [label selector] the choice in the dialog box " ASP.NET label " below " Asp Calendar " , if pursue,10-2 place is shown.

Graph 10-2 Insert " Asp Calendar " label

(4) by " insert " pushbutton, play piece [label editor, Calendar] dialog box, if pursue,10-3 place is shown. In this dialog, can accuse to Calendar calendar the style undertakes installing, because have Chinese, did not tell more here.

(5) save ASP.NET VB dynamic page to be DkCalendar.aspx. Browse in IE, if pursue,10-4 place is shown.

Graph 10-3 [label editor, Calendar] dialog box

           Graph 10-4 DkCalendar.aspx is browsed mediumly in IE

In graph 10-1-4, can see the indication of the week is too long, very ugly! If show,be " day, one, 2, 3, 4, 5, 6 " , that is good.

10.2 The week of modification Calendar shows

(1) DkCalendar.aspx is opened in Dreamweaver, switch arrives code view, search following code:

<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="gb2312" %>

its instead:

<%@ Page Language="VB" Debug="true" Culture="zh-CN"%>

(2) those who click ASP.NET quick menu to fall " а : Xy " pushbutton, insert name a space, if pursue,10-5 place is shown.

(3) this stylish adds code:

<%@ Import Namespace="" %>

The input name a space System.Globalization, namely code instead:

<%@ Import Namespace="System.Globalization" %>

(4) add again name a space System.Threading, if pursue,as a result 10-6 place is shown.

Graph 10-5 Insert name a space

Graph 10-6 Insert the code after naming a space

(5) in code:

<%@ Import Namespace="System.Treading" %>

Later, empty group, insert following code:

<script Runat="server">

Dim Dkday ' the links string overall situation that defines generation of option date place is variable

' changes week of shown function

Private Sub Calendar1_PreRender(ByVal Sender As Object, byVal E As System.EventArgs) Handles Calendar1.PreRender

Dim Dkwek = System.Threading.Thread.CurrentThread

Dim Dknew = System.Globalization.CultureInfo.CurrentCulture.Clone()

" of day of Dknew.DateTimeFormat.DayNames = New String() {" , "One " , "2 " , "3 " , "4 " , "5 " , "6 "}

Dknew.DateTimeFormat.FirstDayOfWeek = DayOfWeek.Sunday

Dkwek.CurrentCulture = Dknew

End Sub

</script>

(6) the former code that chooses calendar to accuse a Calendar1, switch arrives [label] of face plate [attribute] option gets stuck, spread out " the exterior " option, choice " DayNameFormat " next pulling menu, choose " Full " , if pursue,10-7 place is shown.

(7) save DkCalendar.aspx, undertake browsing in IE, if pursue,as a result 10-8 place is shown.

  

Graph 10-7 Choice " DayNameFormat " the value is " Full "        Graph 10-8 After DkCalendar.aspx is revised, browse in IE

10.3 Add calendar incident

(1) DkCalendar.aspx is opened in Dreamweaver, switch arrives code view, choose the former code of Calendar1, right key clicks it, choose in playing the quick menu that go out " editor label (E)<asp:cAlendar> " , if pursue,10-9 place is shown.

Graph 10-9 Choose " editor label (E)<asp:cAlendar> "

(2) playing piece [editor label, Calendar] in the dialog box, spread out " incident " , choose " OnSelectionChanged " , be in " Calendar, OnSelectionChanged " in incident text area, input " Calendar1_SelectionChanged " , press " affirmatory " pushbutton, if pursue,10-10 place is shown.

Graph 10-10 Edit OnSelectionChanged incident

(3) the code that if graph 10-11 red encircles place to show,adds in label of code <script Runat="server"> .

Graph 10-11 Add Calendar1_SelectionChanged incident

(4) between label <head></head> , if graph 10-12 red encircles shows code,insert.

(5) look for label <body> , its instead is like graph 10-13 red to encircle shows code.

Graph 10-12 Insert Javascript function Dkwk

Graph 10-13 Modification label <body>

(6) again Calendar1 " DayNameFormat " set for " Full " , consult 10.2 medium the 6th measure.

(7) save DkCalendar.aspx, open Index.aspx, following code add in Page_load function:

If Request.QueryString("dkday")<>nothing Then

Ztre.CommandText="SELECT * FROM ZTRE WHERE Cstr(ZITIME) LIKE '%" &Request.QueryString("dkday")&"%' ORDER BY ZITIME DESC "

Else

If (request.QueryString("menanw")<>nothing) Or (session("menanw")<>nothing) Then

Ztre.CommandText="SELECT * FROM ZTRE WHERE LMID = ? ORDER BY ZITIME DESC "

Else

Ztre.CommandText="SELECT * FROM ZTRE ORDER BY ZITIME DESC "

End If

End If

If pursue,as a result 10-14 place is shown.

Graph 10-14 Code is added in Page_load function

(8) the former code that finds record volume Ztre, the command that deletes its CommanText place goes, if pursue,as a result 10-15 red encircles place to show.

Graph 10-15 Amend the former code of the adscript Ztre that record part

(9) save Index.aspx.

10.4 Add embedded frame

(1) open pattern plate Dkblog.dwt.aspx, in ASP.NET quick menu, click " more label " quick pushbutton, playing piece [label selector] in the dialog box, choose " HTML label " , choose " Iframe " , if pursue,10-16 place is shown.

Graph 10-16 Insert Iframe label (namely embedded frame)

(2) click " insert " pushbutton, playing piece [label editor, Iframe] what insert to wanting in the dialog box is embedded frame undertakes place is shown concerned installing is like graph 10-17.

Graph 10-17 Right embedded frame undertakes concerned installing

(3) press " affirmatory " pushbutton, return [label editor, Iframe] dialog box, press again " shut " pushbutton.

(4) save pattern plate Dkblog.dwt.aspx, update all webpages.

(5) Index.aspx is browsed in IE, if pursue,as a result 10-18 place is shown.

Graph 10-18 Index.aspx is browsed in IE

  Remind: Actually the implementation of calendar incident is very complex incident, a simple case just gives out here. It is embedded that this one still has a difficulty frame is right advocate the control of window object, just lifted in here with "Parent.location.href" control advocate of window webpage be on the move. These left readers to study slowly.

Dreamweaver compose builds memoir of Blog whole journey (9)- site statistic

The 9th chapter The implementation of site statistic

At present till, doking's BLOG already can be run. But can discover left navigation or empty sky, below paragraphic and main add functional bill of fare for left navigation. This one chapter basically explains concerned site count is added on navigation to the left.

9.1 Basic page is designed

Open pattern plate Dkblog.dwt.aspx, the character is added to if graph 9-1 place is shown,be designed on navigation to the left.

Graph 9-1 Character of left navigation of pattern plate Dkblog.dwt.aspx is designed

9.2 Online number statistic

The implementation of online number statistic must rely on Global.asax file. Global.asax file included the program code of incident of administrative levels of processing application process, resemble the Global.asa file in classical ASP. The <script> label in Global.asax included face correspondence to use the incident processor of order administrative levels. The first group incident processor is in charge of handling those who use a program to begin and stop incident. When one begins incident to be able to be requested in any page first time, be waked up. And applied process stops incident to be met be waked up when applied process is shut.
Build Global.asax file, general and procurable make up. OK now Visual Web Developer 2005 builds Global.asax file quickly in this software.

(1) Visual Web Developer 2005 of download, installation.

Visual Web Developer 2005 downloads an address:

Http://go.microsoft.com/fwlink/ ? Linkid=30092&clcid=0x409

The installation after download, if graph 9-2 place is shown,its welcome an interface.

Graph 9-2 Visual Web Developer 2005 runs greeting interface

(2) after Visual Web Developer 2005 moves, choose [File] → [New File] , playing piece [New File] in the dialog box, spread out " Categories " " Web " option, choose " Visual Basic " , choose " Templates " medium " Global Application Class " , if pursue,9-3 place is shown.

Graph 9-3 New build Global Application Class

(3) click " Open " pushbutton, build if graph 9-4 place is shown,make a new Glbal file.

Graph 9-4 One builds newly-built Glbal file

(4) undertake modification to Glbal file, after revising, like graph 9-5 place is shown.

Graph 9-5 Modification Glbal file

(5) save Glbal file to arrive D:\Below Dkkblog root catalog, file name is Glbal.asax.

(6) in returning Dreamweaver, open pattern plate Dkblog.dwt.aspx, and switch becomes code view, find code:

<td Class="BTD"> stands originally online number statistic: Person </td>

And instead:

<td Class="BTD"> stands originally online number statistic: <%=Application("dk_uses")%>Person </td>

(7) save pattern plate.

Remind: Here builds Glball.asax file with Visual Web Developer 2005, for convenient reader, also let a reader contact Visual Web Developer 2005 at the same time, function of this new software is very powerful. If do not have Visual Web Developer 2005, can build a blank notebook directly, write the code that place of 9-5 of as above graph shows, it is good to save Glball.asax file.

9.3 The statistic that the site takes notes and replies

After-thought is in " 7.1 The user logs onto server behavior " in, its publish statistic of Ceng Wei user note and reply, the statistic that the site takes notes and replies and its kind with.

(1) open pattern plate Dkblog.dwt.aspx, build data set Zdbj, if graph 9-6 place is shown,its are installed; New build data set Zdhf, if graph 9-7 place is shown,its are installed.

Graph 9-6 The setting of data set Zdbj pursues

Graph 9-7 The setting of data set Zdhf pursues

(2) bind destiny to arrive according to Zbhf of collect Zbbj, data set in the page respectively, if pursue,9-8 place is shown.

Graph 9-8 Bind destiny to occupy collect Zbbj, Zbhf

(3) save pattern plate Dkblog.dwt.aspx, update all webpages.

Dreamweaver compose builds memoir of Blog whole journey (the implementation of 8)- administrator page

The 8th chapter The implementation of administrator page

At present till, doking's BLOG basic skill can have come true. But the administrator is sovereign " authority of life and death " , severity manages the note that the user publishs and return, prevent an user to be published in Doking's BLOG have harm sex news.

8.1 The implementation that the administrator logs onto

(1) build Gllogin.aspx of dynamic page of blank APS.NET VB, insert the Glfrm that express sheet, insert form again, if graph 8-1 place is shown,install.

Graph 8-1 The page of Gllogin is designed

(2) the ID that sets the text draw a frame round with corresponding administrator is GLY, the ID of the text casing of password correspondence is GLPASS.

(3) add data set Gly, set to choose, if pursue,8-2 place is shown.

Graph 8-2 Add data set Gly

(4) click " advanced " pushbutton, add parameter @GLPASS, if pursue,8-3 place is shown.

Graph 8-3 Add parameter @GLPASS

(5) in advanced dialog box of data set Gly, if graph 8-4 place is shown,command SQL instead.

Graph 8-4 Advanced dialog box of data set Gly

(6) switch arrives code view, before <html> label, insert the code that shows like graph 8-5 place.

Graph 8-5 Code is inserted before <html> label

(7) save Gllogin.aspx.

8.2 Learn note management

From go up in the section, after can seeing the administrator logs onto a success, catenary receives Doking ' the home page of S BLOG, undertake administrative to learning note. But paragraphic before in, index.aspx did not delete the function that learns note. This one section general adds this one function for it.

(1) in the group in form Ztre, insert Asp label Label1, text is: Delete, if pursue,8-6 place is shown.

Graph 8-6 Insert Asp label Label1

(2) Label1 of label of Asp of right key choice, choose quick menu to fall " editor label " , choose " modal information " , set for sightless, if pursue,8-7 place is shown.

Graph 8-7 Set Asp label Label1 to be sightless

(3) insert watch sheet to accuse below answer choose casing, name for ZTID, insert watch sheet to accuse a pushbutton below, ID is GLY, if pursue,as a result 8-8 place is shown.

Graph 8-8 In the setting of form Ztre

(4) switch arrives [label] below face plate [attribute] option gets stuck, spread out " groovy " , in " Value " in click dynamic data, if pursue,8-9 place is shown.

Graph 8-9 Face plate of ZTID label attribute

(5) playing go out " dynamic data " in the dialog box, choose the field ZTID below data set Ztre, press " affirmatory " key, if pursue,8-10 place is shown.

Graph 8-10 Dynamic data window

(6) <input#ZIID> of choice of right below condition column key opens window of fast editor label, code adds in its label:

Style="visibility: <%# Iif(session("GLY")<>nothing, "Visible" , "Hidden")%>" Value="<%# Ztre.FieldValue("ZTID" , container) %> "

If graph 8-11 is blue-black,be shown.

Graph 8-11 Edit <input#ZIID> label quickly

(7) choice pushbutton GLY, right below condition column key chooses <input#GLY> to open window of fast editor label, code adds in its label:

Style="visibility: <%# Iif(session("GLY")<>nothing, "Visible" , "Hidden")%>" Value="<%# Ztre.FieldValue("ZTID" , container) %> "

(8) add " delete a record " server behavior, if graph 8-12 place is shown,its are installed.

Graph 8-12 Add " delete a record " server behavior

(9) press " affirmatory " key, finish add " delete a record " server behavior. Switch finds this to code view " delete a record " the former code of server behavior, if graph 8-13 is gules,the place in the circle is shown.

Graph 8-13 "Delete a record " the former code of server behavior

(10) what in deleting the 8-2-8 that be like a graph, show 5, 8, 12, 13, 14 code, the False of value True instead of the 10th Debug in travel, add new act: Id= " Del1 " , the place in after revising, be being encircled like graph 8-14 red is shown.

Graph 8-14 After revising " delete a record " the former code of Del1 server behavior

(11) the code that duplicate graph 8-2-9 shows in red circle, duplicate namely after revising " delete a record " the former code of Del1 server behavior, it stickup to proper place, change Id to be " Del2 " , if pursue,8-15 place is shown.

Graph 8-15 Add Del2 " delete a record " server behavior

(12) the code that is record in the place in red of the 8-16 that be like a graph is being inserted to encircle in the incident Page_load that spark to show in the page.

Graph 8-16 The code that inserts in the incident Page_load that spark loads in the page

8.3 Note reply manages

Note reply management and the truth that learn note management and method are consistent.

(1) open Index.aspx, sheet of Label1 of duplicate Asp label, watch accuses a ZTID and pushbutton GLG, open Hf.aspx, accuse these 3 stickup the position that shows to place of the 8-17 that be like a graph, the ID instead HFID that expresses sheet to accuse a ZTID.

Graph 8-17 To Hf.aspx stickup accuse

(2) choice answer chooses casing HFID, switch arrives [label] below face plate [attribute] option gets stuck, spread out " groovy " , in " Value " in click dynamic data, playing go out " dynamic data " in the dialog box, choose the field HFID below data set Hfre, press " affirmatory " key, if pursue,8-18 place is shown.

Graph 8-18 Dynamic data window

(3) in duplicate Index.aspx " Del1 " the former code that deletes a record to serve behavior, stickup in Hf.aspx.

(4) the page in giving Hf.aspx the page loads spark if graph 8-19 is gules,incident Page_load is inserted the code that shows in the circle.

Graph 8-19 Load to H page spark incident Page_load inserts code

(5) the former code that finds the Yhplfrm that express sheet, move its before form Ztre label, if pursue,as a result 8-20 place is shown.

Graph 8-20 Shift expresses the label of odd Yhplfrm

(6) the code that if graph 8-21 red encircles place to show,inserts before form Hftab label.

Graph 8-21 Code is inserted before form Hftab label

(7) the Yhplfrm that express sheet end label </form> moves after form Ztre label, if graph 8-22 red encircles shows code,insert after form Hftab label.

Graph 8-22 Code is inserted after form Hftab label

  Remind: Here still has an administrator to exit entry problem, that leaves a reader to move think. Hint, want to set onlySession(" GLY " )It is OK to be empty value or empty string.

Dreamweaver compose builds memoir of Blog whole journey (the implementation that 7)- user logs onto

The 7th chapter Doking's BLOG user logs onto the implementation of the page

Already finished the enrollment of the user, the user can log onto a website now in, publish response of note, note.

7.1 The user logs onto server behavior

The user logins, course test and verify is correct, the page changed a face after the user logins.

(1) open pattern plate Bkblog.dwt.aspx, to the left column inserts form Yhtab, if the place in circle of graph 7-1 black is shown,design.

(2) insert the data set Yhlog that expresses inquiry about YH, what login with user of test and verify is correct.

① sets data set Yhlog to choose, if pursue,7-2 place is shown.

Graph 7-1 The blueprint of form Yhtab  

 Graph 7-2 Insert data set Yhlog

② is clicked " advanced " pushbutton, switch occupies market pattern to tall progression, if pursue,7-3 place is shown.

Graph 7-3 Insert data set Yhlog

③ clicks parameter " + " , play piece " editor parameter " dialog box, fill in the name is " @Logpas " , the type chooses " WChar " , if pursue,7-4 place is shown.

Graph 7-4 Add attend Logpass

④ is clicked " build " pushbutton, play piece " create a value " dialog box, the name is " Logpass " , the source chooses " the variable that express sheet " , if pursue,7-5 place is shown.

Graph 7-5 Make value dialog box

⑤ is clicked " affirmatory " save a setting, return dialog box of data set Yhlog all the time. Modification SQL statement, modification result is shown like graph 7-6 place.

Graph 7-6 Undertake modification to data set Yhlog

(3) before <html> label, if graph 7-7 red encircles shows code,insert.

Graph 7-7 Define function Uselog

(4) the field YHNAME below the data set Yhlog in Bkblog.dwt.aspx of dilatory pattern plate arrives any page positions, the field YHID below Yhlog of again dilatory data set is in ever since, code is as follows:

<%# Yhlog.FieldValue("YHNAME" , container) %><%# Yhlog.FieldValue("YHID" , container) %>

Above code instead:

<%# Uselog(yhlog.FieldValue("YHNAME" , container) , yhlog.FieldValue("YHID" , container)) %>

(5) insert the data set Bjre that expresses inquiry about ZT, return the study note number that this user publishs.

① establishs data set for " choose " , choose a field to be: YHID, choose means to be: Input value, if pursue,7-8 place is shown.

Graph 7-8 Insert data set Bjre

② is clicked " advanced " , switch occupies market pattern to tall progression, revise SQL.

Graph 7-9 Bjre of modification data set

③ is clicked " editor " pushbutton, in text inside the country YHID instead Session(" USEID " ) , if pursue,as a result 7-10 place is shown.

Graph 7-10 Edit the parameter of data set Bire

④ is pressed " affirmatory " key, press again " affirmatory " Bire of the key data set that finish.

(6) insert the data set Plre that expresses inquiry about HF, return the study note number that this user publishs. Besides inquiring the list is diverse, other setting and data set Bjre are identical (can duplicate first Plre of stickup data set, reentry is revised all right) .

(7) the field Eprl100 below Bjre of dilatory data set in form Yhtab " publish note: " later; The field Eprl100 below Plre of dilatory data set in form Yhtab " publish a response: " later.

(8) move cursor in form Yhtab " user information " before, click ASP.NET quick menu to fall " bind destiny to occupy " , if pursue,as a result 7-11 place is shown.

Graph 7-11 Insert bind destiny to occupy

Maintain cursor to be in graph the position of 71 gules perpendicular, input: Session(" USENAME " )

(9) return design view, in giving form Yhtab " publish new note " establish super link: . . / Ztfb.aspx

In giving form Yhtab " modification data " establish super link: . . / Yhsg.aspx

If pursue,as a result 7-12 place is shown.

Graph 7-12 The modification of form Yhtab

(10) choice form Yhtab, return code view, by " Ctrl+X " or in [editor] the choice in menu " cut " , old method: it stickup in building newly-built notebook or Word documentation.

(11) return design view, choose form Logtab, move cursor to the position of the gules perpendicular that shows like graph 7-13 place.

Graph 7-13 Move to be in the position to cursor

(12) input code, if graph 7-14 is gules,the place in the circle is shown.

Graph 7-14 Code is inserted before label <form>

(13) after moving cursor to Yhlogfrm to end label </form> , input code, if graph 7-15 is gules,the place in the circle is shown.

Graph 7-15 Code is inserted after label </form>

(14) the form Yhtab that cuts in the 7th pace stickup in code <%end Before If%> code, after <% Else %> .

(15) save pattern plate Bkblog.dwt.aspx. Open all webpages that build basically at Bkblog.dwt.aspx pattern plate, be in respectively [server behavior] medium a Bkblog.dwt.aspx pattern plate is medium new additive data set Yhlog, Bjre, Plre, duplicate, stickup come over. Insert the code that is like the 3rd measure again, with respect to OK!

(16) Index.aspx is browsed in IE browser, before the user logins, like graph 7-16 place is shown, if graph 7-17 place is shown,the user logs onto a success. Remembering ASP.NET is not to support Gb2312 encode to transmit, want to undertake modification, already had said in on one chapter, later no longer shiver.

Graph 7-16 Before the user logins

Graph 7-17 After the user logins

Remind: Learn for convenient reader, tutorial cent is written into module. Had to have done in all functions in pattern plate at the beginning actually, the data set that must insert in pattern plate especially and page head loader, because these cannot update a webpage after later period is revised.

7.2 The user publishs return information

After the user logins, can learn note to publish return information to each.

(1) open Hf.aspx, insert the Yhplfrm that express sheet, insert form Hftab again, server text casing is inserted to accuse in form, ID is HFNAME; Insert server text area to accuse, ID is HFTEXT; Insert " publish " pushbutton, ID is Plbottom, set its use to ban, if pursue,as a result 7-18 place is shown.

Graph 7-18 The concerned design of form Hftab

(3) bind destiny to occupy Session(" Usename " ) in form Hftab " full name: " later (the method is bound like 7.1 the 8th measure calm " user information " the user name before) .

(4) the field ZTNAME below Ztre of dilatory data set arrives text casing HFNAME, in the attribute window of text casing HFNAME, initiative value:

<%# Ztre.FieldValue("ZTNAME" , container) %>

Instead:

<%# "RE: " &Ztre.FieldValue("ZTNAME" , container) %>

(5) choice pushbutton Plbottom, right key chooses condition column<Input # Plbottom> , choose in playing a quick menu " editor label " , if pursue,7-19 place is shown.

Graph 7-19 Choice<Label of quick editor of Input # Plbottom>

(6) playing those who go out<In label of quick editor of Input # Plbottom> :

Disabled= " True "

Instead:

Disabled=<%# Iif((session("USENAME")<>nothing) , false, true) %>

If pursue,as a result 7-20 place is shown.

Graph 7-20 Quick<Input # Plbottom> edits label

Set pushbutton Plbottom namely, before loginning when the user, use to ban, after the user logins, be usable.

(4) add insert record server behavior, refer a value to come from the Yhplfrm that express sheet, the choice inserts form to be HF, other setting is shown like graph 7-21 place.

Graph 7-21 Add insert record server behavior

In graph 7-21, can see field HFID, HFTIME, YHID, ZTID did not get a value. Field HFID is automatic number, the database can add numerical value automatically to the record; Field HFTIME already set acquiescent value to be Date() in Access, so the database can give automatically new addition record is added when nature date. That field YHID logs onto the ID of the user to pile up namely, field ZTID wants published note ID namely. The ID yard that wants an entry user so is added in field YHID, the note ID code that should publish is added in field ZTID.

(5) return code view, find insert a record (Dkconn, HF) code, if pursue,7-22 black already selected a part.

Graph 7-22 Find insert a record (Dkconn, HF) code

(6) code:

CommandText='<%# "INSERT INTO HF (HFNAME, HFTEXT) VALUES (? , ? , ) " %>'

Instead:

CommandText='<%# "INSERT INTO HF (HFNAME, HFTEXT, ZTID, YHID) VALUES (? , ? , ? , ? ) " %>'

(7) add parameter by order:

<Parameter Name="@ZTID " Value='<%# Ztre.FieldValue("ZTID" , container) %>' Type="Integer "  / >

      <Parameter Name="@YHID " Value='<%# SESSION("USEID" ) %>' Type="Integer "  / >

If pursue,as a result 7-23 place is shown.

Graph 7-23 Insert a record (Dkconn, HF) the modification result of code

(8) before releasing return information, the content of right reply caption and reply undertakes test and verify, prevent to release the return information of empty caption or empty content. Consult 6.2 RequiredFieldValidato test and verify is inserted to charge a means in the section, accuse a HFTEXT to add RequiredFieldValidato test and verify to accuse to area of text casing HFNAME, text respectively.

(9) when the user releases return information, returns so that give study note reply number increases automatically 1, the HFZS field that leaves to ZT watch namely increases automatically 1.

① is in [server behavior] in face plate, insert " update a record " server behavior, set newer form to be ZT, set temporarily submit a cost, come from the Yhplfrm that express sheet, set temporarily: ' HFZS ' from ' HFTEXT ' get a value (as ' Integer ' ) ; Set temporarily: ' ZTID ' will ' HFTEXT ' use as ' Integer ' will choose a record

Why is ② temporary completely? That is to make Dreamweaver automatic generate a few code first, just revise after. Cut replacement to pile up view first, find newer record (Dkconn, ZT) former code, find among them code:

<Parameter Name="@HFZS" Value='<%# IIf((Request.Form("HFTEXT") <>Nothing) , request.Form("HFTEXT") , "") %>' Type="Integer" /> 

<Parameter Name="@ZTID" Value='<%# IIf((Request.Form("HFTEXT") <>Nothing) , request.Form("HFTEXT") , "") %>' Type="Integer" /> 

its instead:

<Parameter Name="@HFZS" Value='<%# Ztre.FieldValue("HFZS" , container)+1 %>' Type="Integer" />

<Parameter Name="@ZTID" Value='<%# Session("ztanw") %>' Type="Integer" />

(10) save Hf.aspx.

7.3 The user publishs study note

After the user logins, besides can publish return information, still can publish new study note.

(1) build generate dynamic webpage Ztfb.aspx by pattern plate Bkblog.dwt.aspx, the form Ztfb that a the five elements inserts in area can edit in Mainbody.

(2) add data set Zthb, set choose for YHID, set parameter to be level variable USENAME, if graph 7-24 place is shown,its are designed.

Graph 7-24 Add data set Zthb

(3) the concerned field below dilatory data set arrives in form Ztfb, the method consults the 4.2nd method.

(4) open Hf.aspx, the duplicate Yhplfrm that express sheet, it stickup the the five elements of the form Zthb in webpage Ztfb.aspx, HFNAME of casing of clear empty text, undertake be modificationed necessarily, if pursue,as a result 7-25 place is shown.

Graph 7-25 The design of form Ztfb

(2) text casing HFNAME incognito for ZTNAME, text area HFTEXT is incognito for ZTTEXT.

(3) set form Zthb the first, 2, of Zthb of 3 behavior data set repeat area, be in the 4th of form again in insert data set navigation.

(4) insert list / menu LMID, click the tabulated value in its attribute window, in shooting the tabulated value dialog box that give, input project tag to be: Design; The value is: 1, press " affirmatory " key, if pursue,7-26 place is shown.

Graph 7-26 Dialog box of LMID tabulated value

(5) maintain list / menu LMIDl is being chosen, switch arrives code view, find list / the former code of menu LMID, the field LMID below Menuda of dilatory data set, the data that replaces Value to be equal to date 1, if pursue,7-27 place is shown.

Graph 7-27 The field LMID below Menuda of dilatory data set

(6) the field LM below Menuda of dilatory data set, replace " design " , if pursue,as a result 7-28 place is shown.

Graph 7-28 The field LM below Menuda of dilatory data set

(7) the code in choosing graph 7-3-5 red to encircle, define it those who be data set Menuda to repeat area, if pursue,as a result 7-29 place is shown.

Graph 7-29 The data set Menuda in defining list repeats area

(8) add " insert a record " server behavior, if graph 7-30 place is shown,its are installed.

Graph 7-30 Add " insert a record " server behavior

(9) switch arrives code view, find insert a record (Dkconn, the former code of ZT) , find code:

CommandText='<%# "INSERT INTO ZT (LMID, ZTNAME, ZYTEXT) VALUES (? , ? , ? ) " %>'

Instead:

CommandText='<%# "INSERT INTO ZT (LMID, ZTNAME, ZYTEXT, YHID) VALUES (? , ? , ? , ? ) " %>'

(10) add parameter:

<Parameter Name="@YHID" Value='<%# Session("USEID") %>' Type="Integer" />

If pursue,as a result 7-31 place is shown.

Graph 7-31 Insert a record (Dkconn, the former code that ZT) amends

7.4 Modification user data

Design of page of modification user data and user register a page the design is basic and identical.

(1) open register page Yhlogok.aspx, put it additionally for Yhsg.aspx, undertake be modificationed appropriately, if pursue,as a result 7-32 place is shown.

Graph 7-32 Yhsg.aspx page is designed

(2) delete " insert a record (Dkconn, YH) " server behavior, add data set Yhsg, if pursue,7-33 place is shown.

Graph 7-33 Insert data set Yhsg

(3) the concerned field that binds destiny to fall according to collect Yhsg arrives in corresponding text casing, if pursue,as a result 7-34 place is shown.

Graph 7-34 Bind calm trends text to arrive in concerned text casing

(4) add behavior of newer record server, set temporarily: ' YHID ' will ' YHNAME ' use as ' Integer ' will choose a record, if pursue,as a result 7-35 place is shown.

Graph 7-35 Add more record server behavior

(5) be in more in the former code of the record, find code:

<Parameter Name="@YHID" Value='<%# IIf((Request.Form("YHNAME") <>Nothing) , request.Form("YHNAME") , "") %>' Type="Integer" /> 

its instead:

<Parameter Name="@YHID" Value='<%# IIf((Not Session("USEID") Is Nothing) , session("USEID") , "") %>' Type="Integer" /> 

(6) save Yhsg.aspx.

Dreamweaver compose builds memoir of Blog whole journey (the implementation that 6)- user registers

The 6th chapter Doking ' the implementation that S BLOG user registers a page

Somebody detects: Where should that user publish note, response? This is the 6th, the problem that 7 chapters will solve. This one chapter basically explains an user to register the implementation of the page.

6.1 Basic page is designed

  The modification of page of Bkblog.dwt.aspx of 6.1.1 pattern plate

(1) open pattern plate Bkblog.dwt.aspx, to the left the column inserts form Lefttab, the Yhlogfrm that express sheet is inserted in group, form Logtab is inserted in the Yhlogfrm that express sheet, thrust area of concerned text casing, text and button, the result shows like graph 6-1-1 place:

Graph 6-1-1 The user in pattern plate logs onto a design

(2) the writer corresponding text casing names for Logname; the password corresponding text casing names for Logpass, type encode; "Register " the behavioral instead of pushbutton " without " ; " login " the behavioral instead of pushbutton " submit watch sheet " .

(3) choice pushbutton " register " pushbutton, be in [behavior] in face plate, add behavior to turn to URL, in shooting the dialog box that give, input link is " . . / Yhinlog.aspx " place of the 6-1-2 that be like a graph shows:

Graph 6-1-2 Add the behavior that turns to URL

(4) save pattern plate, update all webpages.

   6.1.2 Register the design of the page

(1) build the Yhinlog.aspx of ASP.NET VB dynamic page that generates by pattern plate Bkblog.dwt.aspx, the area can edit to insert the Yhinfrm that express sheet inside the country in Mainbody, insert form Yhinlog again, hand-in-hand travel concerns a design, the result shows like graph 6-1-3 place:

Graph 6-1-3 The design of form Yhinlog

(2) the text casing with choice user corresponding name, switch arrives label face plate, spread out " CSS/ assists a function " , YHNAME is inputted in Id; Spread out " did not classify " , input Runat, server, accuse server of instead of YHNAME text casing, if graph 6-1-4 place shows:

Graph 6-1-4 Label of modification text casing

(3) the rest may be deduced by analogy, the text casing with corresponding password names for YHPASS, the text casing with password corresponding cross-check names for REPASS, the text casing with QQ corresponding code names for YHQQ, the text casing with corresponding Email names for YHEMAIL, the text casing with corresponding homepage names for YHINDEX, server of instead of casing of will all text accuses.

(4) the choice expresses odd Yhinfrm, accuse its instead server, save Yhinlog.aspx.

   6.1.3 Complete the design that registers a page

  (1) build Yhlogok.aspx of dynamic and dynamic webpage by pattern plate Bkblog.dwt.aspx, the area can edit to insert 3 form Logok inside the country in Mainbody, in character of the 2nd input in travel " welcome " , in clicking ASP.NET quick menu " bind destiny to occupy " , click again " the element expressing sheet of clip " , move cursor to the position that shows like graph 6-1-5 place, input " YHNAME " .

Graph 6-1-5 Insert the element expressing sheet of clip

(2) return design view, continue to input a character " Donking's BLOG! " , and, to form Logok, undertake concerned designing, the result shows like graph 6-1-6 place:

The design of Logok of graph 6-1-6 form

(3) choose pushbutton " homepage " pushbutton, be in [behavior] in face plate, add behavior to turn to URL, in shooting the dialog box that give, input link is " Index.aspx " , save Yhlogok.aspx

User of 6.2 test and verify is registered

Register information to prevent what the user inputs a mistake, want to register information to undertake standard and test and verify to the user.

(1) open Yhinlog.aspx, open ASP.NET quick bill of fare, click [more label] , if graph 6-2-1 place shows:

Graph 6-2-1 ASP.NET quick menu

(2) spread out in playing the label selector that go out " ASP.NET label " → " server of test and verify accuses " , wear in right window in be chosen " Asp:REquiredFieldvalidator " , click " insert " by twist, following graph 6-2-2 place show:

Graph 6-2-2 Label selector

(3) in playing the label editor that give, add test and verify to accuse for text casing YHNAME, fill in place of each 6-2-3 that be like a graph shows:

Graph 6-2-3 RequiredFieldValidator label editor

(4) open label selector, insert server of ASP.NET test and verify to accuse a → CompareValidator, add as comparative as REPASS text casing test and verify to accuse for text casing YHPASS, if graph 6-2-4 place shows,write concerned message:

Graph 6-2-4 CompareValidato label editor

(5) insert server of ASP.NET test and verify to accuse a → Rangevalidator, add test and verify to accuse for text casing YHQQ, if graph 6-2-5 place shows,write concerned message:

Graph 6-2-5 Editor of Range Validator label

(6) insert server of ASP.NET test and verify to accuse a → Regularexpressionvalidator, add test and verify to accuse for text casing YHEMAIL, if graph 6-2-6 place is shown,fill each, expression of among them test and verify is: \w+([-+ . ] \w+)*@\w+([- . ] \w+)*\ . \w+([- . ] \w+)*

Editor of label of graph 6-2-6 Regular Expression Validator

(7) insert server of ASP.NET test and verify to accuse a → Regularexpressionvalidator, add test and verify to accuse for text casing YHINDEX, fill in place of each 6-2-7 that be like a graph is shown, expression of among them test and verify is: Http://([\w-]+\ . ) + [\w-]+(/[\w- . / ? %&=]*) ?

Graph 6-2-7 Editor of label of Regular Expression Validator

(8) should another test and verify charges an user that prevents an user to register the name repeats.

① adds data set Yhinlog, set to choose, choose a field to be YHNAME, parameter variable is the YHNAME of the variable that express sheet that come, if graph 6-2-8 place shows,its install:

Graph 6-2-8 Insert data set Yhinlog

② inserts server of ASP.NET test and verify to accuse a → CustomValidator, add test and verify to accuse again for text casing YHINDEX, fill in place of each 6-2-9 that be like a graph is shown, among them client carries function of test and verify to be:

<%# IIf(yhinlog.RecordCount>0, FALSE, TRUE) %>

Graph 6-2-9 Editor of Custom Validator label

(9) save Yhinlog.aspx, undertake browsing in IE, the dialog box that if appear,graph 6-2-10 shows, the Dklog site root of that specification does not have subdirectory Aspnet_client below catalog, also be to do not have test and verify to control a necessary JS script library. When this is installing.NET frame, installation program is already duplicate in acquiescent site C:\Below the root catalog of Inetpub\wwwroot, duplicate C:\The subdirectory Aspnet_client in Inetpub\wwwroot falls to catalog of Dkblog site root, with respect to OK!

Graph 6-2-10 Cannot find library of necessary JS script

6.3 Add " insert a record " server behavior

(1) open Yhinlog.aspx, add [insert a record] server behavior, the watch is added oddly in data table YH about data, if graph 6-3-1 place shows,its concern a setting:

Graph 6-3-1 Add [insert a record] server behavior

(2) ASP.NET is not to support Gb2312 encode to transmit. Switch arrives code view, find:

<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="gb2312" %>

ResponseEncoding="gb2312" this code expunges with respect to OK:

<%@ Page Language="VB" ContentType="text/html"%>

(3) save, browse in IE refer an user to register information, YH table is opened in Access, can you discover referred Chinese information becomes completely? ? . How does that do? Need not urgent, because TASP.NET does not support Gb2312 encode to transmit be caused by,this is. Open Yhinlog.aspx, switch arrives code view, find the first code:

<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="gb2312" %>

its instead:

<%@ Page Language="VB" ContentType="text/html" %>

Namely purify ResponseEncoding="gb2312" . Other webpage also undertakes modification by this law, prevent Chinese to refer information to make mistake.

  

Dreamweaver compose builds memoir of Blog whole journey (the implementation of 5)- cent column and reply

Menu of note of the 5th chapter divides the implementation of column and reply

The home page that those who finish is in in the 4th chapter actually very not perfect, it is note menu cent column does not have a link, cannot click; 2 it is to click note to inscribe mark, cannot link reply page; 3 it is to click an author, cannot link the author's information. Lieutenant general of this one chapter can perfect these functions.

5.1 Note menu divides column implementation

Design train of thought: The menu in Bkblog.dwt.aspx of modification pattern plate divides the super link of column, update all webpages then; When opening home page, browse fall by time the content that order pattern shows to institute study takes notes, click menu to divide column, can undertake according to dividing column order pattern classifies content of indication study note falling by time again.

   5.1.1 build pattern plate menu

(1) open pattern plate Bkblog.dwt.aspx, choose dynamic text version (Menuda.LM) , establish super link, catenary receives home page (Index.aspx) , choice [code shows view] , move the mouse to the place of the gules perpendicular that shows like graph 5-1-1 place. (below all without special specification symbol is English character)

Graph 5-1-1 The mouse moves come to link attribute

(2) input " ? Menanw= " (Menanw is parameter is variable) , switch arrives [bind calm] face plate, dilatory data set (Menuda) the field LMID below arrives to be equal to date to what a moment ago inputted from the back, the result shows like graph 5-1-2 place:

Graph 5-1-2 inserts dynamic attribute (A.href)

(3) switch arrives [server behavior] face plate, can look to had increased action of a server: Dynamic attribute (A.href) , if graph 5-1-3 place shows:

Face plate of behavior of graph 5-1-3 server

(4) choose " homepage " menu, found catenary to receive Index.aspx; Choice " contact us " , found catenary to receive Mailto:wEn110@21cn.com.

(5) save Bkblog.dwt.aspx pattern plate, can shoot a dialog box that shows like graph 5-1-4 place at this moment.

Graph 5-1-4 Update dialog box of pattern plate file.

(6) click " update " pushbutton, menu of the note that finish divides column, update home page Index.aspx.

   5.1.2 In home page implementation divides column to show

(1) open home page Index.aspx, switch arrives [server behavior] face plate, doubleclick data set (Ztre) , in shooting the data set dialog box that give, click " advanced " pushbutton, if pursue,5-1-5 place is shown. Choice [SQL] the SQL command in text area undertakes duplicating, proposal it stickup in building newly-built notebook or Word text version, after it is in, measure lieutenant general can have very big effect (familiar SQL language, can jump over this measure) .

Graph 5-1-5 Data set is advanced dialog box

(2) click " simple " pushbutton, in [choose] next choices in pulling menu choose a field to be LMID, anthology " URL parameter " transfer pattern as parameter, input parameter variable is Menanw, press " affirmatory " key, the result shows like graph 5-1-6 place:

Graph 5-1-6 Modification Ztre data set is choose

(3) undertake to home page IE is browsed, the result that browse does not have a record, if graph 5-1-7 place is shown

Graph 5-1-7 Home page browses a graph

(4) browse in home page IE in, click a link " network process designing " , the graph 4-3-3 place of chapter of result as above is shown, the study that shows all network process designing takes notes.

"Etc, this and former design train of thought are not accorded with! Press minute of column to show only, cannot show all study take notes! " the problem that here still has a data between ASP.NET page to deliver: It is OK that the data between the body of each Form window in Windows application process is delivered through defining global variable (Public Static is variable) wait for a method to come true. And these methods however cannot data of each Web page is delivered in ASP.NET of in order to. For example: Should click data set navigation the data that can have a Ztre_currentPage is delivered, cannot transmit the data of Menanw however, should click data set navigation that is to say any is super link, the data that Menan transmits is empty value forever, this cannot realize minute of column to show already, undertake the page shows is in separating the branch below column at the same time again. Here is to adopt the method that Session has parameter is delivered to solve.

(5) give Session("menanw") to deliver parameter variable Menanw, switch arrives code view, before <html> label, insert the code that in be being encircled like graph 5-1-8 red, shows.

Graph 5-1-8 Insert a page to be record in acquiescent function to Index.aspx

(6) be in [server behavior] data set of the choice in face plate (Ztre) , if graph 5-1-9 place is shown, those who take black part is data set (Ztre) definition code.

Graph 5-1-9 The code of data set Ztre

(7) find code:

CommandText='<%# "SELECT * FROM ZTRE WHERE LMID = ? ORDER BY ZITIME ASC" %>'

the code instead above:

CommandText='<%# IIf(((request.QueryString("menanw")<>nothing) Or Request.QueryString("Ztre_CurrentPage") <>Nothing) , "SELECT * FROM ZTRE WHERE LMID = ? ORDER BY ZITIME DESC" , "SELECT * FROM ZTRE ORDER BY ZITIME DESC") %>'

(8) find code:

<Parameter Name="@LMID " Value='<%# IIf((request.QueryString("menanw") <>Nothing) , request.QueryString("menanw") , "") %>' Type="Integer "  / > </Parameters></MM:DAtaSet>

the code instead above:

<Parameter Name="@LMID " Value='<%# IIf((session("menanw") <>Nothing) , session("menanw") , "") %>' Type="Integer "  / > </Parameters></MM:DAtaSet>

(9) undertake IE is browsed, as a result the graph 4-3-3 place of the 4th chapter is shown. Finish established design train of thought.

  

5.2 The implementation of reply page

Design train of thought: Can realize the caption that clicks note, can link quite give a page, include this note and corresponding and all return. From on one, can this is not difficult already, parameter delivered the code that this note has on the super link in note caption only to be able to come true.

   5.2.1 Basic page is designed

(1) build the Hf.aspx of ASP.NET VB dynamic page that generates by pattern plate Bkblog.dwt.aspx, the area can edit to insert form Ztre inside the country in Mainbody, hand-in-hand travel concerns a design, the result shows like graph 5-2-1 place:

Blueprint of Ztre of graph 5-2-1 form

(2) the Access2003 that start, build FH watch, YH to express join to inquire HFRE, if graph 5-2-2 place is shown,actually join view reachs indication field.

Graph 5-2-2 Inquire the concerned design of HFRE

(3) press 4.2.2 data set the section is then medium (1) - (3) measure, add data set Ztre, dilatory field arrives corresponding position, text version of hand-in-hand action form (Ztre.ZYTEXT) format setting, the result shows like graph 5-2-3 place:

Graph 5-2-3 Bind destiny to occupy form Ztre

(4) Ztre of modification data set is choose, choose a field to be ZTID, anthology " URL parameter " transfer pattern as parameter, input parameter variable is Ztanw.

(5) add data set Hfre, choose a field to be ZTID, anthology " URL parameter " transfer pattern as parameter, input parameter variable is Ztanw, the result shows like graph 5-2-4 place:

Graph 5-2-4 The design of data set Hfre

(6) field of Hfre of dilatory data set arrives the corresponding position of form Ztre, set dynamic text (Htre.HFTEXT) the format is installed " encode, HTML encode format " , form Ztre the 5th, 6, 7, the definition is repeat area, definition data distributes a page to form Ztre, the result shows like graph 5-2-5 place:

Graph 5-2-5 Bind destiny to arrive according to collect Htre in form Ztre

(7) open home page Index.aspx, choose dynamic text version (Ztre.ZTNAME) , establish super link, catenary receives Hf.aspx, switch arrives code view, link attribute instead: Hf.aspx? Ztanw= , the field ZTID below Ztre of dilatory data set arrives after be equal to date, the result shows like graph 5-2-6 place:

Graph 5-2-6 adds dynamic and super link in code

(8) save Hf.aspx and Index.asps, corresponding HF watch, YH watch gives to input a few records casually in Access, make Index.asps is browsed in IE browser, point out the study note theme that has a return, if graph 5-2-7 place shows:

Graph 5-2-7 The indication of reply page

(9) the any that clicks data set navigation again is super link, the result shows like graph 5-2-8 place:

Graph 5-2-8 Click result of the page after data set navigation

Ah! Did not have completely! This counts the issue that gives as it is said between ASP.NET webpage namely. In must resembling 5.1, that undertakes modification.

(10) switch arrives code view, before <html> label, insert the code that in be being encircled like graph 5-2-9 red, shows.

Graph 5-2-9 Insert a page to be record in acquiescent function to Hf.aspx

(11) the code in finding data set Ztre:

 <Parameter Name="@ZTID " Value='<%# IIf((request.QueryString("ztanw") <>Nothing) , request.QueryString("ztanw") , "") %>' Type="Integer "  / > 

Above the Request.QueryString("ztanw") in code is replaced for Session("ztanw") , result code repairs instead

<Parameter Name="@ZTID " Value='<%# IIf((session("ztanw")<>Nothing) , session("ztanw") , "") %>' Type="Integer "  / >

(12) the code in finding data set Hfre:

 <Parameter Name="@ZTID " Value='<%# IIf((request.QueryString("ztanw") <>Nothing) , request.QueryString("ztanw") , "") %>' Type="Integer "  / > 

Above the Request.QueryString("ztanw") in code is replaced for Session("ztanw") , result code repairs instead

<Parameter Name="@ZTID " Value='<%# IIf((session("ztanw")<>Nothing) , session("ztanw") , "") %>' Type="Integer "  / >

(13) save Hf.aspx.

  

Dreamweaver compose builds memoir of Blog whole journey (the implementation of 4)- home page

The 4th chapter Doking ' the implementation of S BLOG home page

Now, all things all has, should begin Doking ' the implementation with the page design of S BLOG and downstage database.

4.1 Basic page is designed

Here, not be the knowledge that should talk about webpage art to create, explain to establish the train of thought of the page inside the website and method in the compose in Dreamweaver MX2004 however.

   4.1.1 websites design train of thought

Before every webpage begins, should be in commonly Firworks or basic page design has been designed in the image design software such as Photoshop, graph 4-1-1 designs good basic page blueprint in Photoshop namely.

Graph 4-1-1 Doking ' blueprint of S BLOG basic page

What draw red to just encircle a part in ① of the serial number in graph 4-1-1 is the left column of the webpage, it is blank at present, after its column is in paragraphic in can add one by one those who go up, the navigation that what the red on picture of serial number ② just encircles a part is a website, the LM in the Dkblog.mdb database that builds by the 3rd chapter expresses trends to generate it. After main train of thought is clear already, begin compose to build the pattern plate of the website.

   4.1.2 compose build website pattern plate

Design train of thought: Compose builds website pattern plate, unite website webpage design. The column menu content of the website expresses dynamic LM to generate as a result of data, the modification of content of menu of column of convenient also website.

(1) open [file] → [build] , open [new documentation] dialog box, choose " category: " for " pattern plate page " , choose " pattern plate page: " for " ASP.NET VB pattern plate " , if pursue,as a result 4-1-2 place is shown.

Graph 4-1-2 Build pattern plate dialog box

(2) click " found " pushbutton, insert graph layer, in its attribute window, set ID for " Main " , " left (L) " and " on (T) " set for 0px, " wide (W) " set for 100% , set to neat means for be placed in the middle. It is for so webpage be placed in the middle.

(3) insert a form, set ID for " BodyT " , set wide for 780 resemble element (this is according to the width of your basic page blueprint design) , the edge of unit division is apart from and span setting is 0, frame degree of finish is set for 0.

(4) " BodyT " form the 2nd perpendicular set to neat means for top, again fractionation is 2, the 1st width is set for 220px, the 1st width is set for 560px (the width that distributes a line also is according to your basic page blueprint distributive) , set the 1st setting color for RGB (236, 236, 236) .

(5) to " BodyT " of form the first, insert corresponding setting figure 3 rows respectively, group perpendicular set to neat means for bottom, the level is set to neat means for right.

(6) still can design size of good caption, font according to need, the color of join font or or match colors plan.

(7) the navigation that builds a website.

① starts Access2003, open Dkblog.mdb database, 4 records such as process designing of planar design, 3D design, webpage design, network are inputted by order in the LM field that expresses in LM, if pursue,4-1-3 place is shown.

Graph 4-1-3 LM expresses data to type

② returns Dreamweaver, switch arrives [server behavior] face plate, click " + " pushbutton, leaving the alternative in pulling menu " data set " , if pursue,4-1-4 place is shown.

Graph 4-1-4 Add data set

③ is being played piece [data set] in the dialog box, data-in market name is " Menuda " , choose in menu is pulled below join " Dkconn " , in next in pulling menu choices of form LM is expressed, the choice is labelled " all " option, the field chooses in menu is pulled below sort " LMID " , set sort to be ascend, the result shows like graph 4-1-5 place:

Dialog box of graph 4-1-5 data set

④ is clicked " test " pushbutton, the dialog box that if graph 4-1-6 place is shown,appears, explain data set establishs a success, click " affirmatory " pushbutton is finished.

Graph 4-1-6 data set checks a dialog box

⑤ switch arrives [bind calm] option gets stuck, develop data set (the field of Menuda) , if graph 4-1-7 place shows:

Graph 4-1-7 Bind calm option card

Field of ⑥ dilatory LM reachs the first of form BodyT, if graph 4-1-8 place shows:

Field of graph 4-1-8 dilatory LM

⑦ unlocks a mouse, at this moment the first character that can increase a paragraph to take an umbrage: {menuda.LM} , input before its " homepage | " , ever since input symbol " | Contact us " , the result shows like graph 4-1-9 place:

Graph 4-1-9 In binding destiny to occupy BodyT to express

⑧ choice takes shadow character {menuda.LM} and the character from the back " | " , choice [insert] menu → [applied process object] → [repeat area] , playing piece [repeat area] data set of the choice in the dialog box is " Menuda " , choose indication record for " all records " , if what graph 4-1-10 shows, click " affirmatory " menu of navigation of the pushbutton website that finish.

Graph 4-1-10 repeats area dialog box

(7) move the mouse to form BodyT the 2nd the 2nd, choice [insert] menu → [pattern plate object] → [can edit area] , in [build can edit area] in the dialog box, input name is " Mainbody " , press " affirmatory " key, if what graph 4-1-11 shows:

Graph 4-1-11 Build can edit area

The initial stage that completes website pattern plate so works, save pattern plate to be Bkblog.dwt.aspx.

   The page of 4.1.3 home page is designed

Design train of thought: After the pattern plate of the website that finish builds the job, be able to it comes compose builds website and newer website.

(1) build " ASP.NET VB " dynamic page, open [revise] menu → [pattern plate] → [use pattern plate to the page] , playing those who go out [choice pattern plate] in the dialog box, choose pattern plate " Dkblog " , click " choice " pushbutton, if what graph 4-1-12 shows:

Graph 4-1-12 Choose pattern plate

(2) move the mouse " Mainbody " in can editing area, insert form, set its ID to be " Ztre " , actually it is designed, this is the content that each study note will show.

Graph 4-1-13 Each learn the content that note will show

4.2 insert data set

This one explaining insertion what data set can explain without on one is so simple. See graph 4-1-13 above all, every study note will show a theme, publish time, note to classify (what belong to minute of column namely) , author (full name) , reply (several) , will see ZT express its blueprint again (3.2 medium graph 3-2-2) , have LMID only (the ID that classifies a column) , without column name, this should join LM expresses ability to obtain; Have YHID only (the ID of the person that publish) , without the author's full name, this should join YH expresses ability to obtain; Other can obtain data from inside ZT watch. "Very complex! " need not worry actually, can resolve all difficulty in Access.

   4.2.1 build data to express join inquiry

(1) the Access2003 that start, choice [inquiry] → is doubleclicked [inquiry is founded in devising view] , playing go out [indication watch] the window, if graph 4-2-1 place shows:

Graph 4-2-1 Add inquiry linked list

(2) add LM watch, ZT watch, YH table respectively by order, the result shows like graph 4-2-2 place:

Graph 4-2-2 Data expresses join view

(3) it is inquiry field design, if graph 4-2-3 place shows:

Graph 4-2-3 Inquire field blueprint

(4) save this inquiry to be ZTRE, finish in Access data expresses join inquiry.

   4.2.2 insert data set

(1) return Dreamweaver, switch arrives [server behavior] face plate, click " + " pushbutton, add data set Ztre, choice form inquires ZTRE for what a moment ago built in Access, the concerned setting of other, if graph 4-2-4 place shows:

Graph 4-2-4 The setting of Ztre data set

(2) switch arrives [bind calm] option gets stuck, develop data set (Ztre) , dilatory field ZTNAME replaces form Ztre medium " study note theme " , dilatory field ZTTIME is replaced " express time " , dilatory field LM is replaced " classification " , dilatory field ZYTEXT reachs the 2nd blank point of form Ztre, other design shows like graph 4-2-5 place:

Graph 4-2-5 In binding destiny to occupy Ztre to express

(3) switch arrives [server behavior] face plate, can look to already added a lot of dynamic text version, doubleclick dynamic text (Ztre.ZYTEXT) , choose a format to be " encode, HTML encode format " , if graph 4-2-6 place shows:

Graph 4-2-6 sets dynamic text pattern

(4) choose form Ztre the first, 2, 3, the repetition that defines them area, if graph 4-2-7 place is shown,its are installed.

Graph 4-2-7 The definition repeats area

Finished a homepage to insert data set and data to bind calm job so.

4.3 minutes of pages show

(1) choose " home page " , be in [server behavior] face plate, click " + " pushbutton, choice [data set distributes a page] → [move to the first page] , if graph 4-3-1 place shows:

Graph 4-3-1 Data set divides page bill of fare

(2) in shooting the dialog box that give, choice data set is Ztre, press " affirmatory " key, if graph 4-3-2 place shows:

Graph 4-3-2 Move to dialog box of the first page

(3) make choice of " before one page " , define amount to to distribute a page according to collect " move before coming one page " ; Make choice of " hind one page " , define amount to to distribute a page according to collect " move to below one page " ; Make choice of " finally " , define amount to to distribute a page according to collect " move to last page " .

(4) " page number " instead " current page number: " be in [server behavior] face plate, click " + " pushbutton, choice [indication record notes number] → [show current page sign] .

(5) saved Index.aspx, the design that completed home page so works, corresponding ZT watch, YH watch gives to input a few records casually in Access, in undertaking IE browser, browse (below paragraphic in if do not have special specification, note is belonged to completely " network process designing " column) , show like graph 4-3-3 place probably:

Graph 4-3-3 home page browses a graph