Microsoft ASP.NET Programming with Microsoft Visual Basic .NET Version 2003 Step by Step [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Microsoft ASP.NET Programming with Microsoft Visual Basic .NET Version 2003 Step by Step [Electronic resources] - نسخه متنی

G. Andrew Duthie

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید







Chapter4 Quick Reference


























To


Do this


Example


Store information in the Application collection


Use either the Application object or the Application.Contents collection to add the item to the collection, or use the Application.Add method.


Application (key)=value

Application.Contents(key) =value

Application.Add(key, value)


Modify information in the Application StaticObjects collection


Add an <Object> tag in Global.asax with the runat="server" attribute and the scope= "application" attribute.


<objectrunat="server" id="myObject"

scope="Application"

class="myClassName"> </ object>


Store session state in a dedicated server process


Modify the sessionState configuration section of your application’s Web.config file, changing the mode attribute to StateServer and the stateConnectionString attribute to the appropriate IP address and TCP port for the state server being used.


<sessionState

mode="State

Server"stateConnection

String= "tcpip=127.0.0.1:42424"/>


Store session state in a SQLServer database


Modify the sessionState configuration section of your application’s Web.config file, changing the mode attribute to SQLServer and the sqlConnectionString attribute to the appropriate data source name, user ID, and password for the SQL Server being used.


<sessionState

mode="SQLServer"sql

ConnectionString= "data

source=127.0.0.1;

user id=sa;password="/>


Provide support for session state without cookies


Modify the sessionState configuration section of your application’s Web.config file, changing the cookieless attribute to true.


<sessionState cookieless="true"/>


/ 126