DOTNET FRAMEWORK is not coordinated ??

xiaoxiao2021-03-06  26

Seeing the Web site development using the ASP.NET Starter Kit on Microsoft China MSDN

This article, I used to feel that this sample program is too old, so I didn't look at it. After reading the article above, Ai ~~~,

Not simple, there is so good, so spend a night, watching the simplest a Starter Kit - Commerce Starter Kit, adding a view aierong article - code reading summary ASP.NET STARTKIT Commerce, this program Even if you read, impetuous people .....

However, a code in the purchase of the house made me doubt: if (context.user.Identity.Name! = ") {Returnid.user.Identity.Name;} Why isn't this: if (Context.user.Identity. Name! = Null) {return context.user.Identity.name;}

Then I did a test, confirmed that my idea was wrong. When the user didn't log in to verify, "" or String.empty, not NULL

Then why will I generate the above doubts? There is a code below Commerce Starter Kit: if (Context.Request.Cookies ["ASPNETCOMMERCE_CARTID"]! = Null) {Return Context.Request.cookies ["aspnetcommerce_cartid"]. Value }

It is also said that there is no value, a return "", a return NULL

Uniform? Coordination?

转载请注明原文地址:https://www.9cbs.com/read-69874.html

New Post(0)