1, List pageThe General List page is mainly used to display data, the list page in this article provides data display and paging, delete operations, new and modified operations. Because there are some people in the garden that are using ViewData
Effect Chart:
The prerequisite is that your Web page is supported Utf-8, as in the Web.config setting as follows:
Copy Code code as follows:
. aspx:
Copy Code code as follows:
Knowledge Point: A binary number, bitwise left n bit, is to multiply the value of the number by 2 of the n-th side
Binary is one of the two right shifts
1. Convert IP address to integer
Principle: IP address can be considered as a 8-bit unsigned
HTML page
Copy Code code as follows:
validaterequest= "False"%>
Extract HTML source after submission (keep state)
User Control
Copy Code code as follows:
User
The JS code for the page page is as follows,
Copy Code code as follows:
Explain the general meaning of the above JS: Define an Init method with two parameters count and Start,count mean to display the number of comments per load,
1, perhaps a little beginner, I hope the master do not "spray" me, because I know not everyone is a master, I am afraid of the experts said I loaded 13;
2, if there is anything wrong place, but also hope that you must be open-minded to learn, if
Here are a few:
1, the simplest and most commonly used method, with a specified character split open vs.net to create a new console project. Then enter the following program under the main () method.
Copy Code code as follows:
Since the number of people who now use WinForm is getting less, May sometimes do a little thing to have to use ASP.net to complete (like a friend of the console please do not thimble), if so, tragedy happens: a gadget (or a small demo project), sent
Next, the string is split, each character is inserted into a table variable, and finally grouped by using GROUP by.
Copy Code code as follows:
Calnumofchtinstr
SET ANSI_NULLS on
Go
SET QUOTED_IDENTIFIER ON
Go
-- ====================
To achieve the first step, you need to split the string into an array, and the function you want to use is split ():
Copy Code code as follows:
string[] arr = s.split (', ');
The second step is to instantiate with dictionary (
1, the list page, the General List page is mainly used to display data, the list page provided in this article, data display and paging, delete operations, new and modified operations. Because there are some people in the garden that are using
Copy Code code as follows:
Operating system name
public string Getosinfo ()
{
return System.Environment.OSVersion.Platform.ToString ();
}
Operating system version
public string getosversion ()
{
return
Class name space Pre-resource registration
Copy Code code as follows:
[Assembly:System.Web.UI.WebResource ("XXX.js.FilePlugin.js", "Text/javascript")]
OnPreRender Events
Resource Name
String _strresourcekey = ""; Resource Name
1. A potentially dangerous Request.Form value was detectedReason:(1) The ValidateRequest property is not properly set on the page or webconfig on which the data is submitted(2) HTML inside wrote two causeSolve:Scenario One: Add this sentence to the
LINQ Paging
Copy Code code as follows:
Testdatacontext dc = new Testdatacontext ();
public string Getpagenum (GridView gridviewname, int pagesize, iqueryable sql)
{
int page;
if (httpcontext.current.request.querystring["page"]!=
1.ASP. NET Operations Database:
Asp. NET data manipulation methods commonly used:
A. ExecuteReader ()
Returns a SqlDataReader object or OleDbDataReader object, with each return or operation directing a record to be saved in the server's memory.
In
Copy Code code as follows:
"'
"Converts data to double numbers
"'
'
"'
"'
Public Shared Function Todbl (ByVal Obj as Object) as Double
If OBJ is DBNull.Value Then
return 0
ElseIf IsNumeric (OBJ) = False Then
return 0
Request.params is actually a collection, which in turn includes Request.QueryString, Request.Form, Request.Cookies, and Request.ServerVariables.
If you want to pass data on two pages, you can only use Request.QueryString, Request.Form,
TextBox If you set Textmode= "MultiLine" the value of its maxlength setting is invalid; In order to achieve such as Tencent Meager, Sina meager such as the effect of the hint (Tencent and Sina meager text box should be used in the textarea), If you
//bound field
//implementation automatic numbering
Commonly used methods (these three best performance)
Other usage
//If the attribute is a string type do not use ToString ()
DataBinder.Eval usage Examples
The format string parameter is
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