Hello,
Maybe a common case, but I really want to not so much as migrate from
PHP/MySQL to C# .NET but learn the new language.
I have made maybe 3/4 very simple systems using C# .NET, but they all
seem to be a little, well simple -- and not uniform at all.
When I use PHP, I always incorperate some kind of template system, so,
say I have a master template and a child template which is loaded
inside the master.
I am aware of the ASP 2.0 master page functionality, but upgrading to
VS.NET 2005 right now isn't really an option; so I'm going to have to
stick with 2003.
Could anybody shed some light on how I would go about maintaining a
constant feel to all my aspx pages? An alternative to the master page
functionality in 2005 perhaps?
Any help at all would be much appreciated!
Thanks,
Nick 7 1851
Hello Nick,
I use WebUserControls for header, footer, menus and other items that should
be the same on all pages. Very similar to using PHP's include() function (I
also come from a PHP & MySQL background).
Regards,
Andrei Pociu
"Nick Bolton" <ni**@renhome.net> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com... Hello,
Maybe a common case, but I really want to not so much as migrate from PHP/MySQL to C# .NET but learn the new language.
I have made maybe 3/4 very simple systems using C# .NET, but they all seem to be a little, well simple -- and not uniform at all.
When I use PHP, I always incorperate some kind of template system, so, say I have a master template and a child template which is loaded inside the master.
I am aware of the ASP 2.0 master page functionality, but upgrading to VS.NET 2005 right now isn't really an option; so I'm going to have to stick with 2003.
Could anybody shed some light on how I would go about maintaining a constant feel to all my aspx pages? An alternative to the master page functionality in 2005 perhaps?
Any help at all would be much appreciated!
Thanks, Nick
Andrei,
Thanks for the reply! Glad to know I'm not the only lost developer from
a PHP background.
I just read a very interesting article on user controls and custom
controls by a guy called Solomon Shaffer ( www.15seconds.com). I
reccomed anybody to have a look. http://www.15seconds.com/issue/020319.htm http://www.15seconds.com/issue/020430.htm
Glad I stumbled across this, it's shed a lot of light on the subject.
But what I still can't understand is why Microsoft have decided to
include "Master pages" in the .NET 2.0 framework. What's the
difference...? Is it just easier to use?
I believe master pages are a different concept, they don't seem similar to
WebUserControls:
ASP.NET 2.0 introduces a new concept known as Master Pages, in which you
create a common base master file that provides a consistent layout for
multiple pages in your application. To create a Master Page, you identify
common appearance and behavior factors for the pages in your application,
and move those to a master page. http://www.devx.com/dotnet/Article/18042
I haven't tried them yet but I'm planning to soon.
Don't give up on ASP.NET even though some things might differ a lot from
PHP, after you get the hang of it, you'll see it was worth it ;).
Regards,
Andrei Pociu
"Nick Bolton" <ni**@renhome.net> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com... Andrei,
Thanks for the reply! Glad to know I'm not the only lost developer from a PHP background.
I just read a very interesting article on user controls and custom controls by a guy called Solomon Shaffer (www.15seconds.com). I reccomed anybody to have a look.
http://www.15seconds.com/issue/020319.htm http://www.15seconds.com/issue/020430.htm
Glad I stumbled across this, it's shed a lot of light on the subject. But what I still can't understand is why Microsoft have decided to include "Master pages" in the .NET 2.0 framework. What's the difference...? Is it just easier to use?
Hello
The master template can be done with ASP 1.0, but you will have to implement
it yourself, and you will not have WYSIWYG from VS2003 that VS2005 provides
with master pages.
The idea is make one .aspx page with a PlaceHolder control, then override
the CreateChildControls method to dynamically load and add a user control
(.ascx) file to the PlaceHolder. Determining what .ascx file to use can be
done by query strings, url rewriting and reading the path, or any other
method.
Best regards,
Sherif
"Nick Bolton" <ni**@renhome.net> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com... Hello,
Maybe a common case, but I really want to not so much as migrate from PHP/MySQL to C# .NET but learn the new language.
I have made maybe 3/4 very simple systems using C# .NET, but they all seem to be a little, well simple -- and not uniform at all.
When I use PHP, I always incorperate some kind of template system, so, say I have a master template and a child template which is loaded inside the master.
I am aware of the ASP 2.0 master page functionality, but upgrading to VS.NET 2005 right now isn't really an option; so I'm going to have to stick with 2003.
Could anybody shed some light on how I would go about maintaining a constant feel to all my aspx pages? An alternative to the master page functionality in 2005 perhaps?
Any help at all would be much appreciated!
Thanks, Nick
Sherif,
Nice idea, if it works, it sure beats loading several UserControls on
to a page at once, then just switching the visability.
How would I go about creating a new UserControl from a path? Don't they
have to be registered on the aspx page?
For example, say I wanted to load in "/Pages/Home.ascx" and assign it
to currentPage (which is a UserControl object). What method would I use
to do this?
Serif,
Found the LoadControl method, which works perfectly. Apart from one
minor detail, which I cant seem to fix...
Controls within my called UserControl don't seem to work... at all. Any
ideas why not? No errors are returned, the control just seems to not
bother running the associated event then posts nothing back to the
page.
InitializeComponent is however run, and the event controler for the
control is added, but as I said, nothing is actually run when a button
is clicked for example.
Well, third and final post in a row I should hope. Solved the problem!
All thanks to a top guy called Denis Bauer. He created a Control called
"DynamicControlsPlaceholder".
The issue I had yet to discover was that when I posted back to my page,
all the Controls with my PlaceHolder weren't being saved to the
viewstate. This means that the events could never actually be fired as
the UserControl had dissapeared.
As you may have guessed, the DynamicControlsPlaceholder solved this
very nicely indeed by... You guessed it, saving the view state. http://www.denisbauer.com/ASPNETCont...aceholder.aspx This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: AF |
last post by:
I am a real novice to php and MySQL, with about a week's worth of
reading and self tutoring. I have an urgent need to publish a
database of information and need some guidance on how to do this.
...
|
by: Sarah Tanembaum |
last post by:
Though I installed MySQL5 and PHP5, how come my phpinfo() shows as follow:
MySQL Support enabled
Active Persistent Links 0
Active Links 0
Client API version 3.23.57 <<<<<<<<<<<<<<<
...
|
by: Raju V.K |
last post by:
I am developing a web site which requires a set og unique values be
transferred between pages and server many times. There fore i decided
to put the values in an array so that only one reference to...
|
by: Jeremy Booker |
last post by:
I installed the current stable release of MySQL from RPMs. I used the client
and server packages.
After installing the server package, the RPM printed a note saying I should
run two commands. I...
|
by: Jamie Krasnoo |
last post by:
Will placing Apache::RequestRec & Apache::RequestIO & APR::Table in
startup.pl to load them up for multiple handlers have any bad side
effects? I noticed that when I load them via startup.pl the...
|
by: MLH |
last post by:
A programmer developed an AMP (Apache/MySQL/PHP) application
for me. When he was done, he sent me the PHP files and the MySQL
dump file. Now, when I connect to the application on my LAN using...
|
by: 21novembre |
last post by:
Hi all,
I made a question several days before to describe my strange trouble of
mysqldump. But I still can't figour it out. Well, I just want to ask
another question whether I could just backup...
|
by: zhengfish |
last post by:
Hi,All,
I try to install mysql-5.0.15 on RHEL3-U5.
But It give me a error.
MySQL-client-standard-5.0.15-0.rhel3.i386.rpm
MySQL-devel-standard-5.0.15-0.rhel3.i386.rpm...
|
by: John Wells |
last post by:
Guys,
My boss has been keeping himself busy reading MySQL marketing pubs,
and came at me with a few questions this morning regarding PostgreSQL
features (we're currently moving to PostgreSQL).
...
|
by: subho2009 |
last post by:
Hello friends,
I have face a problem, the problem is that when i fetch data from mysql database i get '&' in the place of '&'. I am using php 5.1.2 and mysql version 5.0.11-beta.
What is the...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
|
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...
| |