Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Loading aspx/ascx

Reply
Thread Tools

Loading aspx/ascx

 
 
=?Utf-8?B?TWljaGVs?=
Guest
Posts: n/a
 
      05-23-2005
Hi folks,

Little questions:

I need to load different aspx and ascx files, depending on user settings.
The files are all identically (the pages contains the same asp components) ,
except some layout elements can differ (html tables, images, ... can differ.

Is there a way to overwrite the aspx content from before rendering? (Would
be somehting like loading another template in ASP.NET 2.0)
 
Reply With Quote
 
 
 
 
Brock Allen
Guest
Posts: n/a
 
      05-23-2005
> I need to load different aspx and ascx files, depending on user
> settings. The files are all identically (the pages contains the same
> asp components) , except some layout elements can differ (html tables,
> images, ... can differ.


Sure, this is not a problem. Dynamically create the controls (or call LoadControl)
and then add them into the page at the right place by calling Controls.Add().
Also, recreate those controls upon every postback - that's an important step.

> Is there a way to overwrite the aspx content from before rendering?
> (Would be somehting like loading another template in ASP.NET 2.0)


You can always manipulate the control tree prior to Render and that's how
you control the layout. It's the same as adding controls described above.

-Brock
DevelopMentor
http://staff.develop.com/ballen



 
Reply With Quote
 
 
 
 
MW de Jager
Guest
Posts: n/a
 
      05-23-2005
Have you tried panels. Create a different panel for each user, and maybe
another panel with controls that will always be visible. Make all the other
panels invisible. On page load, make only the panels visible that are
relevant to your user.

My 2c
MW

"Brock Allen" <> wrote in message
news: ...
>> I need to load different aspx and ascx files, depending on user
>> settings. The files are all identically (the pages contains the same
>> asp components) , except some layout elements can differ (html tables,
>> images, ... can differ.

>
> Sure, this is not a problem. Dynamically create the controls (or call
> LoadControl) and then add them into the page at the right place by calling
> Controls.Add(). Also, recreate those controls upon every postback - that's
> an important step.
>
>> Is there a way to overwrite the aspx content from before rendering?
>> (Would be somehting like loading another template in ASP.NET 2.0)

>
> You can always manipulate the control tree prior to Render and that's how
> you control the layout. It's the same as adding controls described above.
>
> -Brock
> DevelopMentor
> http://staff.develop.com/ballen
>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

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
order of iframe loading with document loading ofir Javascript 0 12-03-2007 12:06 PM
loading image -> detect when image is done loading edfialk Javascript 0 05-10-2007 07:28 PM
[OT] Is loading the second Java application faster than loading the first? David Segall Java 2 01-02-2007 04:41 PM
Image loading using javascript. Handling timeouts and parrallel loading under IE zborisau@gmail.com Javascript 4 08-28-2005 02:02 PM
A weird problem, computer hang while loading wireless, please help =?Utf-8?B?eHV6aGltbw==?= Wireless Networking 0 12-17-2004 04:45 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57