G
Greg
I have a complex page (with 8 complex user controls, and many other
asp.net controls.) I have 2 very similiar pages to create, each page
differing only from the others in one control.
What is the best way to achieve this? I would guess that I have 3
alternatives.
1.) Visual and Logic inheritance. I know absolutely nothing about this
in ASP.NET, and I haven't found anything that appears immediately
simple ( i am in a rush to get this job done!).
2.) Have one page with all the controls on, and pass a parameter in
the request for the page informing it which identity it should assume
- i..e. if "PageA" is sent in the page request, the page should behave
like and contain the controls of a "PageA" type page, etc... This
would appear simple, though the different pages are to have different
security permissions - I intended for each page to be in its own
folder with the web.config file for that folder definining the access
rights for the logged in user. Having one page to do the work of 3
would mean that I would have to do the configration work in the top
level web.config file, which seems a bit more onerous.
3.) Put the contents of the page I have in now into a user control,
and put this user control into 3 different pages. My main worry about
this is the degree of processing overhead involved at the server,
since the control would be complex (many controls + 8 user controls
within it). However, it would mean that I could have 3 distinct pages
that I could more easily apply user access rights to.
I'm from a winforms background, so a lot of the concepts are quite new
to me - I'd appreciate any feedback on this.
Regards,
Greg.
asp.net controls.) I have 2 very similiar pages to create, each page
differing only from the others in one control.
What is the best way to achieve this? I would guess that I have 3
alternatives.
1.) Visual and Logic inheritance. I know absolutely nothing about this
in ASP.NET, and I haven't found anything that appears immediately
simple ( i am in a rush to get this job done!).
2.) Have one page with all the controls on, and pass a parameter in
the request for the page informing it which identity it should assume
- i..e. if "PageA" is sent in the page request, the page should behave
like and contain the controls of a "PageA" type page, etc... This
would appear simple, though the different pages are to have different
security permissions - I intended for each page to be in its own
folder with the web.config file for that folder definining the access
rights for the logged in user. Having one page to do the work of 3
would mean that I would have to do the configration work in the top
level web.config file, which seems a bit more onerous.
3.) Put the contents of the page I have in now into a user control,
and put this user control into 3 different pages. My main worry about
this is the degree of processing overhead involved at the server,
since the control would be complex (many controls + 8 user controls
within it). However, it would mean that I could have 3 distinct pages
that I could more easily apply user access rights to.
I'm from a winforms background, so a lot of the concepts are quite new
to me - I'd appreciate any feedback on this.
Regards,
Greg.