Test my first blog on csdn using wlw

Source: Internet
Author: User

It is very difficult to write a blog on csdn because it is very slow and information will be lost, which makes me very depressed. For this reason, I want to move the blog on csdn TO THE cnblog. However, I found that wlw can be used to write both a csdn blog and a cnblog. I would like to give it a try and I will not move it if I can. I still like the csdn environment.

TestCodeCan be inserted. The paste as vs code plug-in is used here, instead of the windowslivewriter. sourcecode. dll plug-in.

Code snippet
  1. private sub cmdimportusers_click ( byval sender as system. object, byval E as system. eventargs) handles cmdimportusers. click
  2. DimXmldocAs NewXmldocument
  3. Xmldoc. loadxml (txtuserxml. Text)
  4. 'Update the user record in the database
  5. dim responsebuilder as stringbuilder = New stringbuilder ()
  6. For EachXmlitemAsXmlelementInXmldoc. selectnodes ("/Users/user")
  7.  
  8. DimOuserinfoAs NewUserinfo
  9. Ouserinfo. portalid = 0
  10. Ouserinfo. Membership. Username = getxmlitemvalue (xmlitem,"Username")
  11. Ouserinfo. Username = getxmlitemvalue (xmlitem,"Username")
  12. Ouserinfo. profile. firstname = getxmlitemvalue (xmlitem,"Firstname")
  13. Ouserinfo. firstname = getxmlitemvalue (xmlitem,"Firstname")
  14. Ouserinfo. profile. lastname = getxmlitemvalue (xmlitem,"Lastname")
  15. Ouserinfo. lastname = getxmlitemvalue (xmlitem,"Lastname")
  16. Ouserinfo. profile. unit = getxmlitemvalue (xmlitem,"Unit")
  17. Ouserinfo. profile. Street = getxmlitemvalue (xmlitem,"Street")
  18. Ouserinfo. profile. City = getxmlitemvalue (xmlitem,"City")
  19. Ouserinfo. profile. region = getxmlitemvalue (xmlitem,"Region")
  20. Ouserinfo. profile. postalcode = getxmlitemvalue (xmlitem,"Postalcode")
  21. Ouserinfo. profile. Country = getxmlitemvalue (xmlitem,"Country")
  22. Ouserinfo. profile. Telephone = getxmlitemvalue (xmlitem,"Telephone")
  23. Ouserinfo. Membership. Email = getxmlitemvalue (xmlitem,"Email")
  24. Ouserinfo. Email = getxmlitemvalue (xmlitem,"Email")
  25. Ouserinfo. Membership. Approved =True
  26. Ouserinfo. affiliateid = NULL. nullinteger
  27. Ouserinfo. Membership. Password = getxmlitemvalue (xmlitem,"Password")
  28. DimCreatestatusAsUsercreatestatus = usercontroller. createuser (ouserinfo)
  29.  
  30. 'If createstatus = usercreatestatus. Success then
  31. 'Responsebuilder. appendline (string. Format ("User '{0} 'created successfully", ouserinfo. username ))
  32.  
  33. 'Else
  34. 'Responsebuilder. appendline (string. format ("User '{0} 'creation failed: {1}", ouserinfo. username, [Enum]. getname (GetType (usercreatestatus), createstatus )))
  35.  
  36. 'End if
  37. 'Only users who failed to import will be output.
  38. IfCreatestatus <> usercreatestatus. SuccessThen
  39. Responsebuilder. appendline (String. Format ("User '{0} 'creation failed: {1 }", Ouserinfo. username, [Enum]. getname (GetType(Usercreatestatus), createstatus )))
  40. End If
  41.  
  42. Next
  43. Txtuserxml. Text = responsebuilder. tostring ()
  44. End Sub

Then we can test whether images can be uploaded.

Contact Us

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

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

A Free Trial That Lets You Build Big!

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

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

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