Você está na página 1de 3

SQL Server and Oracle connection pools are a part of each Web application domain .

Connection pooling is used to share pool connection. When a client requests a connection by calling Open(), it s served directly from the available pool, rather than.re-created. When a client releases a connection by calling Close() or Disp ose(), it s not discarded but returned to the pool to serve the next request. In proc session state can have non serieliazed object but Out proc object should be serilized. Session object should be compressd if using in outproc or contaains large data. aspnet_regsql.exe is used to create session storage database for outproc to Data base. ASP.net state service need to be start and configure in web config for outproc a s state server. Web farms should have same machine keys. IsCrossPagePostBack can be used to check whether the page was called via a Cross Page request. PreviousPage is not null when the page is called via a Cross Page request or Via Server.Transfer method. Server.Transfer can preserve the view state information by Server.Transfer("Cros sPage2.aspx", true). PreviousPage object can be Type cast to the page type class. Button control inheriting from IButtonControl can be used for cross page by sett ing PostBackUrl attribute. Server.UrlEncode() and Server.UrlDecode() can be used for URL-encoded string and URL-decoded string converting unwanted chars in URL. Viewstate is by default encrypted by hash code.EnableViewStateMac can be used to disable hash code. Hash code is calculate on each request. EnableViewState has three values Enabled Disabled and Inherit. Object should be serializable to place into Viewstate otherwse and error will oc cur while adding it into viewstate. LINQ (Language Integrated Query) is a set of extensions that manipulates in-memo ry data in much the same way you query a database. LINQ to Entities, which allows you to use the LINQ syntax to execute a query aga inst a relational database.No ADO.net objects needed. Ajax (Asynchronous JavaScript and XML) is programming shorthand for a client-sid e technique that allows your page to call the server and update its content with out triggering a complete postback.Typically, an Ajax page uses client-side scri pt code to fire an asynchronous request behind the scenes. The server receives t his request, runs some code, and then returns the data your page needs (often as a block of XML markup). Finally, the client-side code receives the new data and uses it to perform another action, such as refreshing part of the page.XMLHttpRequest object the plumbing that s required to su pport asynchronous client requests.

HTTP GET is the first request where IsPostBack will be false and postback reques t is HTTP POST IsPostBack will be true. View State Chunking can be used by setting maxPageStateFieldLength="1024" for se rvers, firwalls refusing hidden field greater than a certain size. ClientIDMode in webconfig or pages or control can be set for controls id naming When you write trace messages, they are automatically sent to all trace listener s. However, if you ve disabled tracing for the page, the messages are simply ignor ed. DefaultButton can be set for a form and is clicked when the user presses the Ent er key. Application events are related to Application domain events like start, stop etc The global.asax file is optional, but a web application can have no more than on e global.asax file,and it must reside in the root directory of the application, not in a subdirectory. ASP.NET creates a pool of application objects when your application domain is fi rst loaded and uses one to serve each request. This pool varies in size dependin g on the system and the number of available threads, but it typically ranges fro m 1 to 100 instances. Each request gets exclusive access to one of these applica tion objects, and when the request ends, the object is reused The <location> element in web.config to create two groups of settings one for the current directory and one that applies only to files in the subdirectory named. In web.config allowOverride is used to enable and disable the setting ovverridin g to sub diretoriers config. ADO Command need CommandType, CommandText, and Connection for usage. ExecuteNonQ uery() used for insert, update, delete ,ExecuteScalar() is used to returns the v alue of the first field of the first row and ExecuteReader() is used to returns a DataReader A DataReader allows you to read the data returned by a SELECT command one record at a time, in a forward-only, read-only stream. NextResult() method goes to nex t select and Read() Advances the row cursor to the next row in the stream. Here the returned Reader object means datarow and column can be accessed by Reader["N ame"].DataReader isn t integrated with .NET nullable values.cmd.ExecuteReader(Comm andBehavior.CloseConnection) will close the connection as you close the DataRead er. SQL injection is the process of passing SQL code into an application. Can be avo ided by parameterized commands or stored procs. Database concurrentcy can be handled by Timestamp-based updating.Most database s ystems support a timestamp column, which the data source updates automatically every time a change is performed. You don t modify th e timestamp column manually. DataView is a view of a Datatable can be used to for custom filtering and sortin g.

Você também pode gostar