Some tips suitable for beginners

xiaoxiao2021-03-06  98

Some tips suitable for beginners

1. Position focus when the web is opened:

3. When designing the vs.net, it will be self-satisfied to join many garbage code.

Add , and before can avoid this problem.

4. Press // automatically generate classes and parameter descriptions in front of the class name, and write a message when writing text;

5. How to make the super connection in ShowModalDialog and ShowModelessDialog do not pop up a new window?

Plus and .

6. String conversion, DataBinder.eval can be formatted with VB built-in functions in VB.NET, while C # is object, no built-in functions

Can be used in VB.NET

MID (DataBinder.eval (Container.DataItem, "Feedback Description"), 1,46)

IIF (DataBinder.eval (Container.DataItem, "Feedback Answers) IS System.dbnull.Value," None ", DataBinder.eval (Container.DataItem, Feedback Answer))))

However, C # is not good, usually implemented in hidden code (* .cs).

ASPX page file CAP_LENTH ((System.Data.DataRowView) Container.DataItem) .row [Feedback Description])

.CS hidden code

Public String Cap_LENTH (Object Discname)

{/ / Do not use temporary variables to save memory space

IF (discname.tostring () .length> 45)

Return Discname.toString () .substring (0,45);

Return discname.toString ();

}

7. Describe information describing the version and name of the DLL control in AssemblyInfo.cs.

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

New Post(0)