Hi Mark,
Welcome to ASPNET newsgroup.
As for the global.asax file component designing problem, yes, in asp.net
2.0/vs2005, the global.asax has changed to not use code behind(all code be
put in asax file by default). Also, ASP.NET 2.0 page no longer mainly rely
on component (draged droped on component designer for page). For data
accessing, we use the DataSource controls instead of the Components
(DataAdapter and DataSet....). And for your scenario, you need get a
global scope DataSet to let other pages read the static datas, you can use
the new VS 2005 DataSet wizard to create a TypedDataSet , the new typed
DataSet wizard will also help us create a TableAdapter, which simplifies
the code for creating TypedDataset, e.g:
suppose we've created the following DataSet and TableAdapter:
(the code will be put in App_code dir)
DataSet1, CategoriesTableAdapter, then we can just use the below code to
create the global dataset in Application_Start event
void Application_Start(object sender, EventArgs e)
{
// Code that runs on application startup
DataSet1TableAdapters.CategoriesTableAdapter adapter = new
DataSet1TableAdapters.CategoriesTableAdapter();
DataSet1 ds1 = new DataSet1();
adapter.Fill(ds1.Categories);
Application["g_data"] = ds1;
}
this is what is being easied through the net TableAdapter components.....
So the original work in asp.net 1.1/vs2003 is not divided into to parts:
1. Use IDE wizard to create the typedDataSet and TableAdapter,
2. Use the TableAdapter to get the TypedDataSet instance ....
Here are some msdn reference about the TableAdapter:
#TableAdapter Overview
http://msdn2.microsoft.com/en-us/library/bz9tthwx.aspx
#TableAdapter Configuration Wizard
http://msdn2.microsoft.com/en-us/library/dex7k4dw.aspx
#How to: Create TableAdapters
http://msdn2.microsoft.com/en-us/library/6sb6kb28.aspx
Thanks & Merry Christmas,
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| NNTP-Posting-Date: Fri, 23 Dec 2005 00:05:14 -0600
| From: Mark Olbert <Ch*********@newsgroups.nospam>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| Subject: ASP.NET 2.0: Global.asax Design Surface Gone
| Date: Thu, 22 Dec 2005 22:05:14 -0800
| Organization: Olbert & McHugh, LLC
| Reply-To:
ma**@arcabama.com
| Message-ID: <ck********************************@4ax.com>
| X-Newsreader: Forte Agent 3.1/32.783
| MIME-Version: 1.0
| Content-Type: text/plain; charset=us-ascii
| Content-Transfer-Encoding: 7bit
| Lines: 12
| X-Trace:
sv3-5Ntq93RzHckZwcpyWNViHv0C5LXsgfulNlvYZG8LBTIms4iqnf yXGL77l/orNaiRDiHQVShl
mtlY0sx!EOtCFvuEclp6p544nSH9cV0rVTIPp2hi5ArOtF2EIp sdi6DrPyi6J5lK324SmvHHSpRw
cw==
| X-Complaints-To:
ab***@giganews.com
| X-DMCA-Notifications:
http://www.giganews.com/info/dmca.html
| X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
| X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your
complaint properly
| X-Postfilter: 1.3.32
| Path:
TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfee d00.sul.t-online.de!t-onli
ne.de!border2.nntp.dca.giganews.com!border1.nntp.d ca.giganews.com!nntp.gigan
ews.com!local01.nntp.dca.giganews.com!news.giganew s.com.POSTED!not-for-mail
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:366726
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| I have several ASP.NET 1.1 websites where I centralized a read-only
dataset (i.e., one which no web page ever changed) and its
| associated SqlDataAdapters.
|
| In 2.0 I noticed that the Global.asax file does not have a design
surface, so I can't drag and drop database components onto it.
|
| I could configure all this stuff manually, but that would be a lot of
work duplicating what the visual designers do just fine.
| Besides, it would put me way behind the curve on getting that promised
70% productivity improvement that I'm guaranteed by switching
| to ASP.NET 2.0 :).
|
| Is there a way to use the visual database tools in ASP.NET 2.0 in a
global setting for a website?
|
| - Mark
|