Microsoft Asp Net Programming With Visual C# Net V 1002003 Step By Step [Electronic resources] نسخه متنی

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

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

Microsoft Asp Net Programming With Visual C# Net V 1002003 Step By Step [Electronic resources] - نسخه متنی

G. Andrew Duthie

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

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

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






Chapter 4 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.


<

object runat="server" id="myObject" scope="Application" class="myClassName"> <

/object>


Store session state in a dedicated server process


Modify the sessionState configuration section of your applications 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="StateServer"stateConnectionString= "tcpip=127.0.0.1:42424"/>


Store session state in a SQL Server database


Modify the sessionState configuration section of your applications 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"sqlConnectionString= "data source=127.0.0.1;user id=sa;password="/>


Provide support for session state without cookies


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


<

sessionState cookieless="true"/>

/ 127