Y
Yehia A.Salam
Hello,
I was trying to connect to an Xml database, and I thought of loading the Xml
Document in "Application_Start" so that the xml is loaded only once and then
queried later as many times as requested, this should the efficient way of
connecting to the database afaik, however I can't access the xml object in
my aspx files with this error "dbxml does not exist in current context":
<%@ Application Language="C#" %>
<script runat="server">
Xmldb dbxml;
void Application_Start(object sender, EventArgs e){
dbxml = new Xmldb(Server.MapPath("~"));
// Code that runs on application startup
}...
I though that any variable declared in the global.asax files should be
available to any other aspx page, how could I access the variable?
Thanks In Advance
Yehia A.Salam
I was trying to connect to an Xml database, and I thought of loading the Xml
Document in "Application_Start" so that the xml is loaded only once and then
queried later as many times as requested, this should the efficient way of
connecting to the database afaik, however I can't access the xml object in
my aspx files with this error "dbxml does not exist in current context":
<%@ Application Language="C#" %>
<script runat="server">
Xmldb dbxml;
void Application_Start(object sender, EventArgs e){
dbxml = new Xmldb(Server.MapPath("~"));
// Code that runs on application startup
}...
I though that any variable declared in the global.asax files should be
available to any other aspx page, how could I access the variable?
Thanks In Advance
Yehia A.Salam