C#web Application Primer One of the classic learning notes _ Basic Application
Source: Internet
Author: User
Recently watched the beginning C # WEB applications Wtith Visual Studio. Net. I feel that this book is good in some detail, special notes, for the latter to provide some of the things that may be useful. Let's write it out today, and finish it up years ago.
REDIRECT the authenticated user back to the originally requested URL
public static void RedirectFromLoginPage (String Username,bool createpersistentcookie);
Parameters
UserName
The name of the user to use for the Cookie authentication. This does not need to be mapped to an account name and will be used by URL authentication.
createPersistentCookie
Specifies whether a persistent cookie should be issued (a cookie saved across a browser session).
Standard database Operations 1
String SQL;
SqlCommand cmd;
SqlConnection Conn;
SQL = "INSERT INTO ...";
conn = new SqlConnection ("data Source = (local);" Initial Catalog = Caoxicao;userid = sa ");
cmd = new SqlCommand (sql,conn);
Conn.Open ();
Cmd. ExecuteNonQuery ();
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.