「アプリケーション共通の変数を、Global.asaxで定義」の編集履歴(バックアップ)一覧に戻る
アプリケーション共通の変数を、Global.asaxで定義 - (2008/02/07 (木) 14:55:43) の編集履歴(バックアップ)
アプリケーション共通の変数を、Global.asaxで定義
概要
タイトルのまんま
元ネタ
前提条件
手順
Global.asax に以下を追加する。
Public Shared ReadOnly str1 As String = "hoge"
not found (245.jpg)
default.aspx を以下のように変更
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Response.Write(Global.ASP.global_asax.Str1)
End Sub
End Class
not found (246.jpg)