Construction of the whole record Dreamweaver Blog (7): User Login Implementation

Related Tags:

  Registered users has been completed, users can now log into the website, a laptop, notebook back. 

  7.1 users log server acts 

  User login, proven correct, the pages for a user's face. 

  (1) Open template bkblog.dwt.aspx, inserted in the left column yhtab forms, and design in Figure 7-1 shown in the black circle. 

  (2) Insert on the table for YH data sets yhlog to verify the correct user. 

  ① yhlog data sets will be set selection, as shown in Figure 7-2. 

  Figure 7-1 yhtab forms of design 

  Figure 7-2 insert data sets yhlog 

  ② click on the "Advanced" button, and switch to advanced data collection mode, as shown in Figure 7-3. 

  Figure 7-3 insert data sets yhlog 

  ③ click parameters "," pop-up "Edit Parameters" dialog box, fill in the name "@ Logpas" type of choice "WChar", as shown in Figure 7-4. 

  Add to participate in Figure 7-4 Logpass 

  ④ click on "establishment" button, the pop-up "production values" dialog box, the name "Logpass" source selection "form variables," as shown in Figure 7-5. 

  Figure 7-5 generate value dialog 

  ⑤ click "OK" to save the settings, yhlog data set has been returned to the dialog box.    SQL statement to amend, modify the results shown in Figure 7-6. 

  Figure 7-6 on the revised data sets yhlog 

  (3) In "html> tags, inserted as shown in Figure 7-7 red circle code. 

  Figure 7-7 defined functions uselog 

  (4) drag template bkblog.dwt.aspx data sets in the field YHNAME yhlog pages to any location, then drag data sets yhlog the field YHID subsequently, the code below: 

  <% # Yhlog.FieldValue ( "YHNAME" Container) %><%# yhlog.FieldValue ( "YHID" Container)%> 

  The code above read: 

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

  (5) Insert the ZT on the table for the data sets bjre, returned to the user a total of study notes. 

  ① data sets as a "screening" Screening field: YHID, screening methods: the import value, as shown in Figure 7-8. 

  Figure 7-8 insert data sets bjre 

  ② click on the "Advanced" and switch to advanced data collection mode, will be transformed into an SQL shown in Figure 7-9. 

  Figure 7-9 modify data sets bjre 

  ③ click on the "Edit" button, text field to the YHID session ( "USEID"), the results shown in Figure 7-10. 

  Figure 7-10 edit data sets the parameters bire 

  ④ on "OK" button, and click the "OK" button bire complete data sets. 

  (6) Insert on the table for HF data sets plre, returned to the user a total of study notes.    Apart from the inquiry form different, other settings with the same data set bjre (first copy can paste data sets plre, further amended). 

  (7) data sets bjre drag the field to form yhtab Eprl100 "in a notebook:"; drag data sets plre the field Eprl100 yhtab to form the "released Re:". 

  (8) Form yhtab the cursor moved to the "User Information", click on the shortcut menu ASP.NET "bundled data," with the result shown in Figure 7-11. 

  Figure 7-11 inserted bundled data 

  Maintain the cursor in Figure 71 red vertical line position, enter: session ( "USENAME") 

  (9) Return to Design view, yhtab to form the "new notes issued," the establishment of a hyperlink: .. / ztfb.aspx 

  Yhtab to form the "modifications" to establish a hyperlink: .. / yhsg.aspx 

  The results shown in Figure 7-12. 

  Figure 7-12 forms yhtab changes 

  (10) Form of Election yhtab back to the code view, according to the "Ctrl X" or [edit] menu, select "shear" old methods: the pasting it into the newly established Notepad or Word document. 

  (11) Return to design view, select logtab form, the cursor moved to the red shown in Figure 7-13 vertical line position. 

  Figure 7-13 moved to the cursor location 

  (12) Enter the code in Figure 14 shown in the red circles. 

  Figure 7-14 on the label before <form> Insert code 

  (13) the cursor moved to the end of labels Yhlogfrm </ form>, the importation of code in Figure 7-15 shown in the red circles. 

  Figure 7-15 label </ form> code inserted after 

  (14) Step 7 shear in the form yhtab paste in the code <% end if%> code before <% else%> after. 

  (15) template bkblog.dwt.aspx preservation.    Open all the Basic template established in bkblog.dwt.aspx website at [server] acts in the bkblog.dwt.aspx template add new data sets yhlog, bjre, plre, copy, paste up.    If re-inserted into the first three steps of the code, OK! 

  (16) in the IE browser to index.aspx, users log before shown in Figure 7-16, user success shown in Figure 7-17.    Remember that ASP.NET does not support gb2312 coding transmission, it is necessary to make changes in the last chapter has been said, the future no longer Chisuo. 

  Figure 7-16 before users log 

  Figure 7-17 User Login 

  Reminded: In order to facilitate the learning, curriculum is divided into modules to write.    In fact one must begin in the template to all of the features, particularly in the templates must be inserted into the data set and the first page printed in the program, because they can not be modified in the late updated. 

  7.2 users information released back 

  User login, you can learn all the notes issued back information. 

  (1) Open hf.aspx, insert the form yhplfrm, then insert a table Hftab, inserted in the table server text box controls, id for HFNAME; insert text regional server controls, ID for HFTEXT; insert "a" button, ID To plbottom, set it as banned, the results shown in Figure 7-18. 

  Figure 7-18 form of the design Hftab 

  (3) bonding session data ( "usename") to form Hftab in the "Name:" (methods such as 7.1 8 steps bundled "user information" before the user). 

  (4) data sets Ztre drag the text box to the field ZTNAME HFNAME, in the text box HFNAME attributes window, the initial value: 

  <% # Ztre.FieldValue ( "ZTNAME" Container)%> 

  Read: 

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

  (5) Select button plbottom, right selection column <input # plbottom>, in the quick pop-up menu, select the "Edit label", as shown in Figure 7-19. 

  Figure 7-19 choice <input # plbottom> quick edit labels 

  (6) In the pop-up <input # plbottom> quick edit of the label: 

  Disabled = "true" 

  Read: 

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

  The results shown in Figure 7-20. 

  Figure 7-20 fast <input # plbottom> edit labels 

  Button located plbottom, when a user logs before the ban, users can sign for. 

  (4) Add inserted record server, the values from the form yhplfrm, select insert tables for HF, and other settings as shown in Figure 7-21. 

  Figure 7-21 record server acts add insert 

  In Figure 7-21, we can see that field HFID, HFTIME, YHID, ZTID have earned value.    HFID field is automatically code, the database will automatically add value to the record; HFTIME field has been located in Access default values for the date (), the database will automatically add the new record date of the day.    The field is YHID user login ID code, is to field ZTID notes issued ID.    Therefore, users should log ID code YHID added to the field, to be delivered Notes ID code added to the field in ZTID. 

  (5) Return to view the code and find insert records (dkconn, HF) code in Figure 7-22 has selected some black. 

  Figure 7-22 found insert records (dkconn HF) code 

  (6) Code: 

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

  Read: 

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

  (7) Add sequence parameters: 

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

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

  The results shown in Figure 7-23. 

  Figure 7-23 insert records (dkconn, HF) code changes results 

  (8) In a response issued before heading back in the back and to verify the contents to prevent the release air content, or air heading back information.    Inserted in the light of 6.2 RequiredFieldValidato Validation controls, respectively HFNAME to the text box, text regional control HFTEXT add RequiredFieldValidato validation controls. 

  (9) users to post a response, the study notes must revert to the automatic increases in the total number of 1, that is, to the Under HFZS ZT fields automatically increase. 

  ① acts in the [server] panel, insert the words "to update records" server acts as a form updated ZT, temporarily located to the values from the form yhplfrm, for the time being: 'HFZS' from 'HFTEXT' access values (as a ' Integer '); for the time being:' ZTID 'will be' HFTEXT 'for' Integer 'record to choose 

  ② why all temporary?    It is to let Dreamweaver automatically generates code, revised after convenience.    Switching to view the code and find updated records (dkconn, ZT) of the original code, the code to find them: 

  <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" /> 

  It read: 

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

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

  (10) kept hf.aspx. 

  Notes 7.3 users published study 

  User login, in addition to a resume information, they could also learn a new notebook. 

  (1) template bkblog.dwt.aspx generated by the new dynamic website ztfb.aspx in mainbody can edit insert a regional Element forms ztfb. 

  (2) Add zthb data sets, based screening for YHID, as well as parameters for variable USENAME stage, the design shown in Figure 7-24. 

  Figure 7-24 add data sets zthb 

  (3) tractors under the relevant data sets to form ztfb field, the way the light of the 4.2 method. 

  (4) Open hf.aspx, copy form yhplfrm, pasting it into Web forms zthb ztfb.aspx in the fifth line, empty text box HFNAME, and the necessary changes, the results shown in Figure 7-25. 

  Figure 7-25 ztfb Form Design 

  (2) the text box HFNAME renamed ZTNAME, text regional HFTEXT renamed ZTTEXT. 

  (3) Form zthb for the first, second and third acts of redundant data sets zthb region, in the form of re-inserted in the fourth line navigation data sets. 

  (4) Insert List / LMID menu, and click the Properties window of the list, a list of values in the pop-up dialog box, enter tags for the project: design; value: 1, according to "OK" button, as shown in Figure 7-26. 

  Figure 7-26 LMID list of the dialog box 

  (5) maintain lists / menu LMIDl the election, switch to code view and find lists / menu LMID the original code, the haulage data sets menuda LMID the field, equivalent to the replacement value of the data 1, in Figure 7-27 shown. 

  Figure 7-27 tractors data sets menuda the field LMID 

  (6) data sets menuda drag the field LM, replacement "design of," with the result shown in Figure 7-28. 

  Figure 7-28 tractors data sets menuda the field LM 

  (7) Choose Fig 7-3-5 red circle in the code, and it is defined as the duplication of data sets menuda region, the results shown in Figure 7-29. 

  Figure 7-29 definition of the list of duplicate data sets regional menuda 

  (8) Add "insert record" server, the settings shown in Figure 7-30. 

  Figure 7-30 add "insert record" server acts 

  (9) switch to code view and find insert records (dkconn, ZT) of the original code, the code found: 

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

  Read: 

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

  (10) add parameters: 

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

  The results shown in Figure 7-31. 

  Figure 7-31 insert records (dkconn, ZT) to revise the original code 

  7.4 modify user information 

  Modify user information page design and user registration page design is basically the same. 

  (1) Open registration page yhlogok.aspx, Save As yhsg.aspx it, and make the appropriate changes, the results shown in Figure 7-32. 

  Figure 7-32 yhsg.aspx page design 

  (2) Delete "insert records (dkconn, YH)" server, add yhsg data sets, as shown in Figure 7-33. 

  Figure 7-33 insert data sets yhsg 

  (3) data sets yhsg bundled under the relevant fields to the corresponding text box, the results shown in Figure 7-34. 

  Figure 7-34 bundled dynamic text to the text box 

  (4) Add the server to update records, for the time being: 'YHID' will be 'YHNAME' for 'Integer' to select records, the results shown in Figure 7-35. 

  Figure 7-35 record server add more acts 

  (5) In a record of the original code, the code found: 

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

  To read: 

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

  (6) the preservation yhsg.aspx. 

Related articles:

XHTML (WEB standards), I see
  Back in college, some of the WEB-standard contacts, then used it as feeling website efficiency is not very high. Arrived later and found that a growing number of Web sites began to use WEB standards Reconstruction. In Hangzhou cattle CHEN I recommend look, as the company projects busy, there...
Application of RSS, as well as some of my thoughts
  Application of RSS, as well as some of my thoughts in the same e-mail, I will involve the following elements:    • RSS cited examples    • RSS entry Advanced    • What can we do as well as solutions    [Text]    1, RSS ...
Dreamweaver use of fast techniques
  1, flexibility in the use of web design styles familiar with the Internet know that the call Style There are many ways, we can click the right mouse button to call options Custon Style Style standards, the status bar can be an element in the list, click the right Style button to call.  &...
CSS achieved with a fixed table of the first HTML forms
  <html Xmlns=" http://www.w3.org/1999/xhtml "xml:lang="en" lang="en"> <head>    <style Type="text/css">    <! --    Body (    Background: # FFF;    Color: # 000;    F...
Cool: Do you mark your ownership, custom marking page layout!
  You decide your marker.    We can customize the layout of pages markings.    Some friends may have such a doubt, the definition of casual marking their browser how to correct understanding?    Here we have to use the namespace documents, then namespace is that...