PC Review


Reply
Thread Tools Rate Thread

Add control to all pages through Global.asax

 
 
Grant Merwitz
Guest
Posts: n/a
 
      12th Aug 2005
Hi

Is there a way to add a control to my page through the Global.asax

I would like to place this code in the Session_Start page so its only added
to the first page the user visits.

TIA


 
Reply With Quote
 
 
 
 
Marina
Guest
Posts: n/a
 
      12th Aug 2005
Create a base page class, that checks for IsNewSession, and adds the
control.

Then have all your pages inherit from this base page.

"Grant Merwitz" <(E-Mail Removed)> wrote in message
news:e4%(E-Mail Removed)...
> Hi
>
> Is there a way to add a control to my page through the Global.asax
>
> I would like to place this code in the Session_Start page so its only
> added to the first page the user visits.
>
> TIA
>



 
Reply With Quote
 
Grant Merwitz
Guest
Posts: n/a
 
      12th Aug 2005
Thanks, that I have used many times before.
But this particular project was not built with that in mind (not built by me
either)
and there are way too many pages to make those changes

Any other ideas?

"Marina" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Create a base page class, that checks for IsNewSession, and adds the
> control.
>
> Then have all your pages inherit from this base page.
>
> "Grant Merwitz" <(E-Mail Removed)> wrote in message
> news:e4%(E-Mail Removed)...
>> Hi
>>
>> Is there a way to add a control to my page through the Global.asax
>>
>> I would like to place this code in the Session_Start page so its only
>> added to the first page the user visits.
>>
>> TIA
>>

>
>



 
Reply With Quote
 
Marina
Guest
Posts: n/a
 
      12th Aug 2005
I don't think you can do it from Session_Start. It's way too early.

All you would have to do, is change what all the pages inherit from. That's
not so much.

"Grant Merwitz" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Thanks, that I have used many times before.
> But this particular project was not built with that in mind (not built by
> me either)
> and there are way too many pages to make those changes
>
> Any other ideas?
>
> "Marina" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Create a base page class, that checks for IsNewSession, and adds the
>> control.
>>
>> Then have all your pages inherit from this base page.
>>
>> "Grant Merwitz" <(E-Mail Removed)> wrote in message
>> news:e4%(E-Mail Removed)...
>>> Hi
>>>
>>> Is there a way to add a control to my page through the Global.asax
>>>
>>> I would like to place this code in the Session_Start page so its only
>>> added to the first page the user visits.
>>>
>>> TIA
>>>

>>
>>

>
>



 
Reply With Quote
 
Grant Merwitz
Guest
Posts: n/a
 
      12th Aug 2005
yeah, just trying to save myself some time.

Thanks anyway

"Marina" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I don't think you can do it from Session_Start. It's way too early.
>
> All you would have to do, is change what all the pages inherit from.
> That's not so much.
>
> "Grant Merwitz" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> Thanks, that I have used many times before.
>> But this particular project was not built with that in mind (not built by
>> me either)
>> and there are way too many pages to make those changes
>>
>> Any other ideas?
>>
>> "Marina" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> Create a base page class, that checks for IsNewSession, and adds the
>>> control.
>>>
>>> Then have all your pages inherit from this base page.
>>>
>>> "Grant Merwitz" <(E-Mail Removed)> wrote in message
>>> news:e4%(E-Mail Removed)...
>>>> Hi
>>>>
>>>> Is there a way to add a control to my page through the Global.asax
>>>>
>>>> I would like to place this code in the Session_Start page so its only
>>>> added to the first page the user visits.
>>>>
>>>> TIA
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending mail using Timer control in Global.asax Manoj Microsoft Dot NET Framework 1 27th Dec 2007 11:21 PM
Custom Error Pages in ASP.NET - Global.asax Brian Munroe Microsoft ASP .NET 1 28th Apr 2005 07:58 PM
Could not load type 'Global.yaddayadda'. - Global.asax.cs Daniel Bass Microsoft ASP .NET 2 31st Dec 2003 03:57 PM
ASP pages using global.asax?? ani Microsoft ASP .NET 2 22nd Nov 2003 08:20 PM
Custom Control Referencing Global.asax --- Possible? Ron Microsoft ASP .NET 3 20th Oct 2003 12:37 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:39 PM.