GJAX IS UNDER CONSTRUCTION! (※日本語ブログ)

Please wait a minute for GJAX/2008

ホーム 連絡をする 同期する ( RSS 2.0 ) Login
投稿数  171  : 記事  0  : コメント  754  : トラックバック  50

ニュース

今後のスケジュールについて

予定なし

インフォメーション

わんくま同盟メンバ ブログ トップ

ブログタイトル(July 2007~)
GSP.NET GJAX!
【読み方:じーえすぴーどっとねっと/じーじゃっくす】
【サブ:~ A C# programmer dives into ASP.NET! ~】

ASP.NET AJAXと違って、GSP.NET [ghost_shell's (web) pages & .NET]の部分が正式名称、GJAX!の部分が省略形・俗語となっています。

過去のブログタイトル
【表記:ウェブ100】
【読み方:うぇっぶいちまるまる】
【サブ:.Net & Webに てん ぜろ】

書庫

日記カテゴリ

次に示すページを見つつ、読んでいただきたい。(欲を言えばVS2005を触りつつ、です。)

  @IT:.NET TIPS [ASP.NET]アプリケーション全体で共有するデータを扱うには?(静的メンバ編) - C# VB.NET Webフォーム
  http://www.atmarkit.co.jp/fdotnet/dotnettips/122globalobj/globalobj.html

static変数とApplicationオブジェクトの事に関してはリンクに書かれています。また経緯についても割愛させていただきます。

 

まずVisual Studio 2005を立ち上げていただきたい。 <おいっ!

 

(空の)Webサイトを作ってもらって、[新しい項目の追加]からグローバル アプリケーション クラスを選択し、Global.asaxのファイル名のままで「追加」を押そうとします

 

何か違うことに気づきませんでしたか。

 

[別のファイルにコードを書き込む(P)]が選択不可になっています。

VS.NET(2003)ではコードビハインドだったのに、VS2005ではそうでなくなっています。

「どういうことー(どんだけ~)?」と思いながらクリックしました。

 

<%@ Application Language="C#" %>

 

<script runat="server">

 

    void Application_Start(object sender, EventArgs e)

    {

        // アプリケーションのスタートアップで実行するコードです

 

    }

   

    void Application_End(object sender, EventArgs e)

    {

        //  アプリケーションのシャットダウンで実行するコードです

 

    }

       

    void Application_Error(object sender, EventArgs e)

    {

        // ハンドルされていないエラーが発生したときに実行するコードです

 

    }

 

    void Session_Start(object sender, EventArgs e)

    {

        // 新規セッションを開始したときに実行するコードです

 

    }

 

    void Session_End(object sender, EventArgs e)

    {

        // セッションが終了したときに実行するコードです

        // メモ: Web.config ファイル内で sessionstate モードが InProc に設定されているときのみ、

        // Session_End イベントが発生します。session モードが StateServer か、または SQLServer

        // 設定されている場合、イベントは発生しません。

 

    }

      

</script>

こんな風にコードが色づけ無しで表示されて、さらに驚きました。記事内の画像と見比べてください。
ちなみにファイル読み込み直後だけで、しばらくしたら色分けしてくれます。

それでも、書き方が全然違うことに戸惑いを隠せません。クラス名が無いというのも大きな違いです。

 

そして思いました。

「どこに宣言すればいいんだ~。」

その日はとりあえずページクラスに宣言しました。

 

そして1日後・・・

試しに<script runat="server"></script> 中に書いてみましたところ、デバッグの前のビルドを通りました。

 

解決したかに見えましたが、新たな問題が浮上しました。

「“Global.”でアクセスできないぞ~。」

 

今もなお(「そして1日後・・・」は今日のことですが)このやり方では解決していません。


July 17. 2007

タイトル編集、タグ修正

投稿日時 : 2007年7月11日 18:44

コメント

# re: Visual Studio 2005 で static 変数 2007/07/12 10:07 けろ
確認ですが、VS.NET2005 のSP1は適用されていますか?
もし、適用されているのであれば、Webサイトとして、新規作成する
のではなく、WebProjectとして新規作成してあげれば、
Global.asaxもCodeBehindされたものが自動で作成されますよ!

・[ファイル] -> [新規作成] -> [プロジェクト]を選択
・[ASP.NET Webアプリケーション」を選択し、WebProjectを
 作成する
・作成したWebProjectにGlobal.asax を追加する。
・作成されたGlobal.asax.vb (CodeBehind)を開き、
 クラス名を[Global] に変更する

という、感じでしょうか。

# re: Visual Studio 2005 で static 変数 2007/07/12 10:58 ghost_shell
製品を書き忘れていました。
Microsoft Visual Studio 2005 Team Edition for Software Developers

コメントありがとうございます。

[プロジェクト]にWebのテンプレートは無く、[Webサイト]の方を見ても[ASP.NET Webアプリケーション]と一致するテンプレートは無いです。

SP1で変更になったと考えられますね。
(だとしたら、VS.NETリリース版に分かれた後に追加されたのかな??)

特に支障は無いですが、Service Pack適用について聞いてみようと思います。
適用しているはずの自宅PCのVSでも確認しておきます。

# re: Visual Studio 2005 で static 変数 2007/07/12 11:00 けろ
おっしゃる通り、SP1で、WebProjectという概念が追加されました。
(2003の頃は、普通にできたんですけどね)
結構、SP1で、いろいろと改善されていますので、試してみてくださいね。


# re: Visual Studio 2005 で static 変数 2007/07/12 11:02 けろ
おっと。忘れてました。ちなみに、あたしも
「Microsoft Visual Studio 2005 Team Edition for Software Developers 」
を使って試しましたので、SP1あてるだけで、大丈夫なはずです。

# re: Visual Studio 2005 で static 変数 2007/07/12 11:16 けろ
度々すいません。補足です。もしいろんな制限でSP1をあてるのが難しいようであれば、英語版になりますが、WebProjectが作成可能になるパッチがあります。

http://www.microsoft.com/downloads/details.aspx?familyid=8B05EE00-9554-4733-8725-3CA89DD9BFCA&displaylang=en

こちらをあてて試しても見ても良いかもしれません。

# re: Visual Studio 2005 で static 変数 2007/07/12 11:23 むら
はじめまして、むらです。

英語版のパッチはVS2005の英語版がインストールされていないと駄目なので御勧めできないですね。
とはいえ、SP1が出るまではそれでしのいでおりましたが (^^;) > ね、けろさん

@ITに関連のページがありました。ご参考になれば。
http://www.atmarkit.co.jp/fdotnet/dotnettips/586webappproject/webappproject.html

個人的にはWebサイトモデルは避けています。
プロジェクトのプロパティで指定できる事も少ないですし、VSSで余計なものまでプロジェクト管理対象になってしまい、多人数でビルドすることが出来なくなってしまったりで...
今のProjectでもWebアプリケーションモデルで構築しています。

# re: Visual Studio 2005 で static 変数 2007/07/12 11:27 ghost_shell
ありがとうございました。

あてることにしました。
431MBあるファイルのダウンロードは数分で終わりましたが、インストールは時間がかかるって書いてあったのでインストールをいつにしようか考えています。

自宅VSの時にどれくらい時間がかかったか忘れました。その時はダウンロードの方が大変だった気が・・・。

--------------------

>度々すいません。補足です。もしいろんな制限でSP1をあてるのが難しいようであれば、英語版になりますが、WebProjectが作成可能になるパッチがあります。

気にされたのでしたら、こちらこそすいません。ほとんどがVisual Studioでの業務になるんでOKだと思いますが、なにせ新入りなんで・・・。

# re: Visual Studio 2005 で static 変数 2007/07/12 11:50 ghost_shell
>@ITに関連のページがありました。ご参考になれば。
http://www.atmarkit.co.jp/fdotnet/dotnettips/586webappproject/webappproject.html

参考になります。

まさしく適用時のほうが自宅で使っているVSの画面です。(で、今のは未適用時)

本文で書いたことに対する修正も"互換性のため"ということになるのでしょうか。「互換性」と聞いてしまうと、ちょっとためらいたくなります。(でもWebアプリケーションを作るのに、他のテンプレートを選ばないですが。)


>とはいえ、SP1が出るまではそれでしのいでおりましたが (^^;) > ね、けろさん

そういうこともあるのですね。

# re: Visual Studio 2005 で static 変数 2007/07/12 13:51 けろ
あたし&むらさんは、このWebProjectが対応されるSP1の日本語版の登場を長い間、待ち焦がれていたんですよ(笑)

それまでは、英語版のVS.NETを入れて、WebProjectのパッチ(英語版)で、しのいでおりました。SP1が出て、今はホッとしてます。

Webサイトで作らない!WebProjectで作る!これが基本になりそうですw

# re: Visual Studio 2005 で static 変数 2007/07/15 14:21 なちゃ
つうか
ASP.global_asax
でいけませんか?


# re: 【解決済み】Visual Studio 2005 で static 変数 (ASP.NET) 2007/07/17 16:56 ghost_shell
>つうか
>ASP.global_asax
>でいけませんか?

そうやってアクセスするのですね。知りませんでした。

# Webサイト VS Webアプリケーション 2007/09/20 15:34 拝啓、さかもとと申します
@IT会議室のスレで以下のようなものがありました。 http://www.atmarkit.co.jp/bbs/phpBB/viewtopic.php?topic=41285&amp;forum=7 global.asaxを追加したけど「global.asax.vb」が無い、という内容。

# Webサイト VS Webアプリケーション 2007/09/20 15:34 拝啓、さかもとと申します。
Webサイト VS Webアプリケーション

# Did anyone hear of HYIP? 2009/11/05 0:24 appoiginvossy

Good day, sun shines!
There have were times of troubles when I didn't know about opportunities of getting high yields on investments. I was a dump and downright stupid person.
I have never imagined that there weren't any need in large starting capital.
Nowadays, I'm happy and lucky , I begin take up real income.
It gets down to select a correct companion who utilizes your money in a right way - that is incorporate it in real deals, parts and divides the income with me.

You can get interested, if there are such firms? I have to tell the truth, YES, there are. Please get to know about one of them:
http://legalmoneynow.info


# The place where daring dreams come true! 2009/11/23 9:35 Shoorknak
Hi !.
You may , probably curious to know how one can collect a huge starting capital .
There is no initial capital needed You may start to get income with as small sum of money as 20-100 dollars.

AimTrust is what you need
AimTrust represents an offshore structure with advanced asset management technologies in production and delivery of pipes for oil and gas.

Its head office is in Panama with structures around the world.
Do you want to become a happy investor?
That`s your choice That`s what you desire!

I`m happy and lucky, I started to get real money with the help of this company,
and I invite you to do the same. If it gets down to select a proper companion who uses your savings in a right way - that`s AimTrust!.
I make 2G daily, and what I started with was a funny sum of 500 bucks!
It`s easy to join , just click this link http://bankinfodata.net and go! Let`s take this option together to get rid of nastiness of the life

# That who stands aside always is a loser! 2009/12/11 18:46 Accibeinvoimi
Hello !.
You re, I guess , probably very interested to know how one can collect a huge starting capital .
There is no need to invest much at first. You may begin to get income with as small sum of money as 20-100 dollars.

AimTrust is what you thought of all the time
The company incorporates an offshore structure with advanced asset management technologies in production and delivery of pipes for oil and gas.

It is based in Panama with offices around the world.
Do you want to become an affluent person?
That`s your choice That`s what you wish in the long run!

I`m happy and lucky, I began to get real money with the help of this company,
and I invite you to do the same. If it gets down to choose a correct companion utilizes your funds in a right way - that`s the AimTrust!.
I earn US$2,000 per day, and what I started with was a funny sum of 500 bucks!
It`s easy to start , just click this link http://sowaqewo.kogaryu.com/kyxebic.html
and lucky you`re! Let`s take our chance together to become rich

# Nobody escapes the fate, but does anyone try to prevent doing your fate yourself? 2009/12/19 3:21 BimbWomiPoodo
Good day !.
might , probably very interested to know how one can reach 2000 per day of income .
There is no need to invest much at first. You may begin to get income with as small sum of money as 20-100 dollars.

AimTrust is what you haven`t ever dreamt of such a chance to become rich
The company incorporates an offshore structure with advanced asset management technologies in production and delivery of pipes for oil and gas.

It is based in Panama with offices around the world.
Do you want to become a happy investor?
That`s your chance That`s what you desire!

I`m happy and lucky, I started to take up real money with the help of this company,
and I invite you to do the same. If it gets down to select a proper companion utilizes your funds in a right way - that`s AimTrust!.
I make 2G daily, and my first deposit was 1 grand only!
It`s easy to get involved , just click this link http://saceqydag.kogaryu.com/uxekaz.html
and lucky you`re! Let`s take our chance together to become rich

# Restaurants 2010/10/01 9:01 Seglechanline

Restaurants in the United States. Search or browse list of restaurants. http://restaurants-us.com/ca/Elk%20Grove/Cold%20Stone%20Creamery/95624/


#  Best US insurance agencies 2010/10/15 11:34 choigemem

http://insuranceinstates.com/texas/Portland/Patricia%20Farias%20-%20Allstate%20Insurance%20Agent/78374/


# re: ??????Visual Studio 2005 ? static ?? (ASP.NET) 2011/06/29 2:37 Nascar ESPN
Esta es mi primera visita i tiempo aqu&#237;. He encontrado cosas interesantes para muchos en su blog sobre todo el debate. De las toneladas de comentarios sobre sus art&#237;culos, creo que no soy el &#250;nico que tiene toda la diversi&#243;n aqu&#237;! mantener el buen trabajo.

# I really wanted to extend my gratitude... 2011/07/13 1:47 fishermadhen

I really 'd like to expand my respects for free forex signal which have brought my family and I grand financial success. Smartfxsol and track record are just incredible. I 'd like to keep it up.

check it on smartfxsol.com

# re: ??????Visual Studio 2005 ? static ?? (ASP.NET) 2011/07/22 20:27 Jonie1980
Bom Despacho, e este post me ajudou muito no meu trabalho da universidade. Agradecimentos voc&#234; como suas informa&#231;&#245;es.

# re: ??????Visual Studio 2005 ? static ?? (ASP.NET) 2011/08/22 23:09 recessed lighting wholesale
Hey ? good blog, simply wanting around some blogs, seems a reasonably good platform You Are using. I’m at the moment utilizing Drupal for a number of of my websites however trying to change one of them over to a platform very much the same to yours as a trial run. Something specifically you'll recommend about it?

# re: ??????Visual Studio 2005 ? static ?? (ASP.NET) 2011/09/06 21:59 lighting manufacturers in the UK
Just killing some in between class time on Digg and I found your article . Not normally what I desire to read about, but it was completely price my time. Thanks.

# lighting from manufacturer 2011/09/14 14:34 outdoor lighting manufacturers usa
hey all, I used to be just checkin’ out this blog and I really admire the basis of the article, and don't have anything to do, so if anybody want to to have an engrossing convo about it, please contact me on AIM, my title is heather smith

# re: ??????Visual Studio 2005 ? static ?? (ASP.NET) 2011/09/17 3:08 refrigerator repair
Hey ? good blog, just trying round some blogs, appears a fairly good platform You Are using. I’m presently utilizing Drupal for a few of my websites but looking to change one in every of them over to a platform very much the same to yours as a trial run. Anything particularly you'd suggest about it?

# Product review 2011/10/06 4:56 FramnBobram
Product Review http://www.roznica.com.ua/goodsdetails_stiralnie-mashini-samsung-wf8598nmw9-ylp-wf8598nmw9_13764.html Samsung WF8598NMW9/YLP WF8598NMW9/YLP
quality review

# re: ??????Visual Studio 2005 ? static ?? (ASP.NET) 2011/10/11 23:00 buy winstrol
I envy your capability to publish wonderful article ? simply wanted to say I like this !

# re: ??????Visual Studio 2005 ? static ?? (ASP.NET) 2011/11/02 5:25 MaxEDD
Great stuff from you, man. Ive read your stuff before and youre just too awesome. I love what youve got here, love what youre saying and the way you say it. You make it entertaining and you still manage to keep it smart. I cant wait to read more from you. This is really a great blog.

#  Shop and product review 2011/11/16 11:10 Hipsypedydevy
Very cool product review A4tech X5 005D Dark Blue/Black (X5-005D-1) http://www.roznica.com.ua/goodsdetails_mishki-a4tech-x5-005d-dark-blue_3382.html compare to other and quality review

# re: ??????Visual Studio 2005 ? static ?? (ASP.NET) 2011/11/25 9:50 lighting manufacturers
i use lamp shades with CFL ubls instead of incandescent lamps, they are much cooler and uses less electricity“

# re: ??????Visual Studio 2005 ? static ?? (ASP.NET) 2011/12/05 3:29 anabolics
The best essential information is this, that you have try to do very well approaching for that homelessness body and their helping hand. I am so inspired about that, after read your this useful written articles and your opinions on blogs.wankuma.com also which is so attractive for do something for those

# re: ??????Visual Studio 2005 ? static ?? (ASP.NET) 2011/12/14 13:57 appliance repair
This article on blogs.wankuma.com gives the light in which we can observe the reality.

# re: ??????Visual Studio 2005 ? static ?? (ASP.NET) 2011/12/20 19:15 buy anabolics online
Congratulations on having one of the most sophisticated blogs I've came across in some time! Its just incredible how much you can take away from something simply because of how visually beautiful it is. Youve put together a great blog space great graphics, videos, layout. blogs.wankuma.com is definitely a must-see blog!

# Download HD films 2011/12/22 20:42 Higexemia
Download Amusement http://www.vod.com.ua/skachat-film-razvlechenie-9722.html HD Развлечение 2009


# ï»¿æ ‡é¢˜
2012/12/10 7:03 MEreurort
cool,googd idea.
http://bettahosting.com/forum/YaBB.pl?num=1354171105/0#0
http://imperial.absoc.co.uk/forum/topic.php?id=163546&replies=1#post-176480
http://neu.pekan.de/content/top-ten-clothing-brand-major-industry
http://www.barbaragrengs.com/forum/topic.php?id=542363&replies=1#post-571720
http://www.rjmprogramming.com.au/drupal/node/986


# Hwblv Tuv Wkqs Jee Xidalo 2014/12/02 14:20 WilliamOa
continually over the last a decade, whilst the French bp cuff remains by far the most renowned sort of top. The priciest cufflinks ever offered have been some fond of the particular soon-to-be Full Ed VIII by their afterwards spouse Wallis Simpson. These types of included diamonds placed in platinum and also purchased at public sale forwonderful show of favor along with architectural may harmonize using just about any attire, proper or even informal, below a vital function built in within Simon approach connected with simpleness, any cufflink for all occasions.
http://www.dstreamtech.com/upload/fille/2014113016464358559.html
http://www.rochet.com/imagge/2014113016564478012.html
http://www.dstreamtech.com/upload/fille/2014113016471136873.html
http://www.dstreamtech.com/upload/fille/2014113016463618594.html
http://www.rochet.com/imagge/2014113016551696507.html
http://www.dstreamtech.com/upload/fille/2014113016443063797.html
http://www.dstreamtech.com/upload/fille/2014113016502961300.html
http://www.dstreamtech.com/upload/fille/2014113016462965913.html
http://www.dstreamtech.com/upload/fille/2014113016494414676.html
http://www.rochet.com/imagge/2014113016524950575.html
http://www.rochet.com/files/201412111343212052.html
http://www.rochet.com/files/201412111314813003.html
http://www.rochet.com/files/201412111293872162.html
http://www.rochet.com/files/201412111345170065.html
http://www.rochet.com/files/201412111283870560.html
http://www.rochet.com/files/20141211129081715.html
http://www.rochet.com/files/201412111302388934.html
http://www.rochet.com/files/201412111285014315.html
http://www.rochet.com/files/201412111303140804.html
http://www.rochet.com/files/201412111284626175.html
http://www.chfloor.net/pic/201412114172438234.html
http://www.veschi.us/app/201412114123864568.html
http://www.material-improvements.com/app/201412114132016100.html
http://www.srestates.com/app/201412114121080679.html
http://www.jeromeselection.com/aps/201412114102721099.html
http://www.miamishuttleservices.com/pic/201412114173738298.html
http://www.tristarcorp.org/aps/201412114211142919.html
http://www.recoverysouth.com/cs/201412114101877192.html
http://www.cosmoscorp.com/app/201412114153611308.html
http://www.cosmoscorp.com/app/201412114152129951.html


# Tsnil Plq Fchp Rlx Fnshyj 2014/12/03 11:03 JoaquinDut
??Stuff your own personal Ugg trunk using papers if you are definitely not puting on them. This specific keeps them put up, so that they may lengthen with the hindfoot. Scrunch upwards paintballs regarding document make all of them within the sneakers. Designate the region within your outfits variety to your Ugg start. Make sure that almost nothing sways from the shoes, making these expand around. Just one remedy is always to use themhttp://www.picins.com/cs/20141221037771790.htmlhttp://www.enitegroup.com/images/201412213282672224.htmlhttp://www.repeatco.com/ep/201412211405899013.html leading of your pantry. Strollhttp://www.enitegroup.com/images/201412213282625174.html assemble in the Ugg shoe http://www.picins.com/cs/20141221037890228.htmlhttp://www.picins.com/cs/20141221037860756.htmlhttp://www.enitegroup.com/images/201412213282778448.htmlhttp://www.enitegroup.com/images/201412213282790432.htmlhttp://www.repeatco.com/ep/201412211405871347.htmlhttp://www.repeatco.com/ep/201412211405826859.htmland run. Overextending your toes may possibly develop themhttp://www.picins.com/cs/20141221037882969.html lengthen. Walking little by little might help. Is actually http://www.enitegroup.com/images/201412213282726962.htmldifficult to definitely avoid anyhttp://www.picins.com/cs/20141221037811096.html stretch within your Ugg Classic Short shoe. http://www.enitegroup.com/images/201412213282820270.htmlTake making use that they have. View any kind ofhttp://www.enitegroup.com/images/201412213282886816.html provides about the Ugg shoe since part of their ownhttp://www.picins.com/cs/20141221037889575.html character. hopeful Posts ugg footwear outlet, http://www.enitegroup.com/images/201412213282885705.htmlBlack Ugg Boots, Ugg Traditional brief,http://www.enitegroup.com/images/201412213282828997.html this information with a Close friend! http://www.enitegroup.com/images/201412213282941732.htmlObtain Content like this one http://www.picins.com/cs/20141221037857190.htmlone on one to your e mailhttp://www.enitegroup.com/images/201412213282963169.html package! Register at no cost nowadays!
http://www.rongrob.com/coo/201412211425914803.html
http://www.congenitalcmv.org/coo/20141221148886834.html
http://www.congenitalcmv.org/coo/20141221148959336.html
http://www.genyresearch.com/coo/201412211473626591.html
http://www.jordancarrental.com/coo/201412211461790013.html
http://www.jaycoelectric.com/image/20141221391426607.html
http://www.cruiserco.com/image/201412213381740212.html
http://www.fmogsc.com/image/201412213263263391.html
http://www.fmogsc.com/image/201412213263783975.html
http://www.kncclublambs.com/image/201412213174176036.html
http://www.coasttocoastart.com/cs/201412210363176749.html
http://www.motleyassoc.com/xp/201412210404997552.html
http://www.stolenjewelry.org/xp/201412210413363823.html
http://www.flyfishingkeywest.com/ep/201412210443774221.html
http://www.mtillman.com/ep/20141221046373577.html


# vyAhcxtXgnmgmHGq 2022/04/19 13:14 johnansog
http://imrdsoacha.gov.co/silvitra-120mg-qrms

Post Feedback

タイトル
名前
Url:
コメント: