473,769 Members | 7,558 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

I have a question about declaring the Global.ascx:

I have a question about declaring the Global.ascx:

In VS.NET I create a Solution, and there are 4 projects under it. They
are put under 4 folders, but web pages would be called across the 4
projects. For example, web page Page1 in Project1 will redirect to web
page Page2 in Project2 which will further redirect to Page3 in
project3 and Page4 in Project4 and finally back to Page1.

In each web page, some session variables, such as customer ID, Product
ID will be used, so I declare these variables in Global.ascx. My
question is: Do I need to declare 4 Global.ascx files and in each file
I declare the same variables?
Tarun sinha

Mar 1 '07 #1
2 2059
"TARUN" <ta*********@gm ail.comwrote in message
news:11******** **************@ 8g2000cwh.googl egroups.com...
>I have a question about declaring the Global.ascx:

In VS.NET I create a Solution, and there are 4 projects under it. They
are put under 4 folders, but web pages would be called across the 4
projects. For example, web page Page1 in Project1 will redirect to web
page Page2 in Project2 which will further redirect to Page3 in
project3 and Page4 in Project4 and finally back to Page1.

In each web page, some session variables, such as customer ID, Product
ID will be used, so I declare these variables in Global.ascx. My
question is: Do I need to declare 4 Global.ascx files and in each file
I declare the same variables?
Tarun sinha
Please post asp.net questions to the asp.net NG at microsoft.publi c.dotnet.framew ork.aspnet

Willy.

Mar 1 '07 #2
Hi,

"TARUN" <ta*********@gm ail.comwrote in message
news:11******** **************@ 8g2000cwh.googl egroups.com...
>I have a question about declaring the Global.ascx:

In VS.NET I create a Solution, and there are 4 projects under it. They
are put under 4 folders, but web pages would be called across the 4
projects. For example, web page Page1 in Project1 will redirect to web
page Page2 in Project2 which will further redirect to Page3 in
project3 and Page4 in Project4 and finally back to Page1.

In each web page, some session variables, such as customer ID, Product
ID will be used, so I declare these variables in Global.ascx. My
question is: Do I need to declare 4 Global.ascx files and in each file
I declare the same variables?
Each project will be a separated application. Not only you will have to
declare 4 global.asax but the sessions, application, etc will be
independentely.
Why don't you just consolidate it in one unique project?
Mar 1 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

35
4548
by: wired | last post by:
Hi, I've just taught myself C++, so I haven't learnt much about style or the like from any single source, and I'm quite styleless as a result. But at the same time, I really want nice code and I go to great lengths to restructure my code just to look concise and make it more manageable. When I say this, I'm also referring to the way I write my functions. It seems to me sometimes that I shouldn't have many void functions accepting...
4
1771
by: Simon Harris | last post by:
Hi All, I'm new to ASP.Net, so be gentle! (Plenty of 'classic' ASP experience), just one question... - Am I correct in thinking that global functions are stored in ASCX files? Thanks! Simon.
3
3018
by: Robert Walter | last post by:
I want to user the Page method LoadControl inside the Global.asax.cs but when I instantiate a page and try it I get the following error... System.NullReferenceException: Object reference not set to an instance of an object. at System.Web.UI.UserControlParser.GetCompiledUserControlType(String virtualPath, String inputFile, HttpContext context) at System.Web.UI.TemplateControl.LoadControl(String virtualPath) at...
1
1359
by: Asha | last post by:
i want to keep a global variable or a session in global.ascx when ever a user access this particular page. at certain time, this page will do a infinit loop, and i want to set a variable to allow it to only loop how many times i want. e.g 3 times and quit. how can i get this done?
5
4209
by: Daves | last post by:
emm... what exactly is the difference?! If I want a global file without <script></script> tags could I use global.ascx only like class Global { void Session_Start(Object sender, EventArgs e) {...} }
7
5227
by: Ankit Aneja | last post by:
I put the code for url rewrite in my Application_BeginRequest on global.ascx some .aspx pages are in root ,some in folder named admin and some in folder named user aspx pages which are in user folder are using this code of url rewrite project is running completely fine on localhost but after uploading first page (http://emailware.net.temporary.domain.name/user/index.aspx) is fine but as i click 123 Easy-CD Ripper
1
1552
by: Raed Sawalha | last post by:
I have Solution with multiple project as following hierarchy Parent Child Child Child the parent is the ONLY one has the Global.ascx , now im in case i need to access the global.ascx public class (global) of parent project to set a value used there with a specific text, I do not need to add the Parent DLL in each
19
3758
by: Alan Silver | last post by:
Hello, I have been developing ASP.NET with a text editor so far (better way to learn initially), and have now been trying Visual Web Developer. I want to create a project for an existing site and add the files to it. I can add my .aspx and .cs (code-behind) files, but VWD doesn't know which .cs file si the code-behind for any particular .aspx file. When you create a new aspx page in VWD, it automatically puts the code-behind file with...
0
1432
by: Nathan Sokalski | last post by:
I have several UserControls (*.ascx files) that I register in my Web.config file under the <system.web><pages><controlselement. If I mistype the src attribute in the Web.config file, the pages that use the UserControl will add something such as the following to the *.aspx.designer.vb files: Protected WithEvents mycontrol As Global.System.Web.UI.UserControl This is obviously not correct, because Global.System.Web.UI.UserControl is what...
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9865
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8872
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7410
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6674
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5304
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3563
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.