473,839 Members | 1,375 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Design flow for Code-behind

Many (if not most) have said that code-behind is best if working in teams -
which does seem logical.

How do you deal with the flow of the work?

I have someone who is good at designing, but know nothing about ASP. He can
build the design of the pages in HTML with tables, labels, textboxes etc.

But then I would need to change them to ASP.net objects and write the code
to make the page work (normally I do this as I go - can't do this if I work
in a team environment).

Do you typically let the designer build the page first (aspx file) with the
html objects? Then later come along and change the ones you need to asp
objects and then build the code-behind page?

At this point, I assume you would work with both files and the designer
can't be working with the aspx page while you are working with the
code-behind. As you change html objects to asp objects you would need to
work with both files to add the references to the object in the code behind
page.

Also, how would the designer work with the design page while you are making
changes to the code-behind page as the page would probably fail while you
are making changes to the code-behind since the aspx file would refer to it.

Just trying to understand the logistics to this.

Thanks,

Tom
Nov 19 '05 #1
17 2732
Hi Tom,

Good question. The way we work it is, we use custom Server Controls for our
interface. Each Server Control renders a Div or a Table, with the active
elements inside. The Server Control also has a CSS class. The Server Control
itself contains HTML elements with no attributes or styles. Only the parent
container (div or table) has a CSS class.

Our designer can then work on an external CSS style sheet to provide the
layout and style of the Server Control. The CSS class determines how each
HTML element IN the Server Control will be rendered on the client, as each
HTML element in the Server Control is a child of the parent div or table.
You can do a heck of a lot with CSS besides style. You can use CSS
positoning to position the element anywhere in the page, regardless of its
physical location in the HTML. You can also define event behaviors (in terms
of style) with it. For example, a hyperlink could be underlined except when
the mouse os over it. A button could have 2 different background images, one
for onmouseout, and one for onmouseover.

This way, I don't have to think too much about how it's going to look, and
our designer doesn't have to know how it works on the back end.
Encapsulation is a beautiful thing!

We can also mix and match these Server Controls in various pages and
applications, and the CSS makes it look the way it should in whatever
environment it's in.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

"tshad" <ts**********@f tsolutions.com> wrote in message
news:eY******** ******@TK2MSFTN GP12.phx.gbl...
Many (if not most) have said that code-behind is best if working in
teams - which does seem logical.

How do you deal with the flow of the work?

I have someone who is good at designing, but know nothing about ASP. He
can build the design of the pages in HTML with tables, labels, textboxes
etc.

But then I would need to change them to ASP.net objects and write the code
to make the page work (normally I do this as I go - can't do this if I
work in a team environment).

Do you typically let the designer build the page first (aspx file) with
the html objects? Then later come along and change the ones you need to
asp objects and then build the code-behind page?

At this point, I assume you would work with both files and the designer
can't be working with the aspx page while you are working with the
code-behind. As you change html objects to asp objects you would need to
work with both files to add the references to the object in the code
behind page.

Also, how would the designer work with the design page while you are
making changes to the code-behind page as the page would probably fail
while you are making changes to the code-behind since the aspx file would
refer to it.

Just trying to understand the logistics to this.

Thanks,

Tom

Nov 19 '05 #2
I have worked in situations where the designer created the UI first and then
passed the html on to the coder. This works ok, but can cause the coder to
wait on the designer.

I have also worked with a different system where we used controls that were
skinned. This approach requires a solid roadmap for each UI via written
requirements, but it allows the coder to create the code behind and the
controls while the designer works on the html that will be placed in the
skin control. The designer passes the html to the coder when it's complete
and the coder replaces the html control tags with the aspnet control tags in
the html when it gets put together. The custom control that loads up the
skin control simply uses the page.findcontro l("blah") function.

I don't think one is better than the other, but this is how I've dealt with
these challenges in the past.

HTH

--
Jeff Davis
..NET Application Developer
re************* ******@hotmail. com
---------------------------------------------------------------
Life is 90% what happens to you and 10% how you react.
"tshad" <ts**********@f tsolutions.com> wrote in message
news:eY******** ******@TK2MSFTN GP12.phx.gbl...
Many (if not most) have said that code-behind is best if working in
teams - which does seem logical.

How do you deal with the flow of the work?

I have someone who is good at designing, but know nothing about ASP. He
can build the design of the pages in HTML with tables, labels, textboxes
etc.

But then I would need to change them to ASP.net objects and write the code
to make the page work (normally I do this as I go - can't do this if I
work in a team environment).

Do you typically let the designer build the page first (aspx file) with
the html objects? Then later come along and change the ones you need to
asp objects and then build the code-behind page?

At this point, I assume you would work with both files and the designer
can't be working with the aspx page while you are working with the
code-behind. As you change html objects to asp objects you would need to
work with both files to add the references to the object in the code
behind page.

Also, how would the designer work with the design page while you are
making changes to the code-behind page as the page would probably fail
while you are making changes to the code-behind since the aspx file would
refer to it.

Just trying to understand the logistics to this.

Thanks,

Tom

Nov 19 '05 #3
Now I am confused.

I thought the main reason for code behind was to separate the design from
that and they could be worked on by different people at the same time.

But the styles here seems like one works on the page and then the other.

If that is the case, why could it not be done on the same page. You still
have the separation of code and design (code on top and design on the
bottom).

"Jeff Davis" <je************ @hotmail.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
I have worked in situations where the designer created the UI first and
then passed the html on to the coder. This works ok, but can cause the
coder to wait on the designer.
This seems the most logical (but maybe not) way to do it. Without the
design, how does the coder test it?

I have also worked with a different system where we used controls that
were skinned.
What is that?
This approach requires a solid roadmap for each UI via written
requirements, but it allows the coder to create the code behind and the
controls while the designer works on the html that will be placed in the
skin control.
Again, wouldn't this be tough to test?
The designer passes the html to the coder when it's complete and the coder
replaces the html control tags with the aspnet control tags in the html
when it gets put together. The custom control that loads up the skin
control simply uses the page.findcontro l("blah") function.
This sounds similar to what I was talking about doing where the designer
just creates the page using standard HTML elements and then the coder
replaces the ones he wants with asp.net controls.

Tom

I don't think one is better than the other, but this is how I've dealt
with these challenges in the past.

HTH

--
Jeff Davis
.NET Application Developer
remove_je****** ******@hotmail. com
---------------------------------------------------------------
Life is 90% what happens to you and 10% how you react.
"tshad" <ts**********@f tsolutions.com> wrote in message
news:eY******** ******@TK2MSFTN GP12.phx.gbl...
Many (if not most) have said that code-behind is best if working in
teams - which does seem logical.

How do you deal with the flow of the work?

I have someone who is good at designing, but know nothing about ASP. He
can build the design of the pages in HTML with tables, labels, textboxes
etc.

But then I would need to change them to ASP.net objects and write the
code to make the page work (normally I do this as I go - can't do this if
I work in a team environment).

Do you typically let the designer build the page first (aspx file) with
the html objects? Then later come along and change the ones you need to
asp objects and then build the code-behind page?

At this point, I assume you would work with both files and the designer
can't be working with the aspx page while you are working with the
code-behind. As you change html objects to asp objects you would need to
work with both files to add the references to the object in the code
behind page.

Also, how would the designer work with the design page while you are
making changes to the code-behind page as the page would probably fail
while you are making changes to the code-behind since the aspx file would
refer to it.

Just trying to understand the logistics to this.

Thanks,

Tom


Nov 19 '05 #4
"Kevin Spencer" <ke***@DIESPAMM ERSDIEtakempis. com> wrote in message
news:%2******** ********@TK2MSF TNGP14.phx.gbl. ..
Hi Tom,

Good question. The way we work it is, we use custom Server Controls for
our interface. Each Server Control renders a Div or a Table, with the
active elements inside. The Server Control also has a CSS class. The
Server Control itself contains HTML elements with no attributes or styles.
Only the parent container (div or table) has a CSS class.
Do you have separate controls for each asp.net control?

Our designer can then work on an external CSS style sheet to provide the
layout and style of the Server Control. The CSS class determines how each
HTML element IN the Server Control will be rendered on the client, as each
HTML element in the Server Control is a child of the parent div or table.
You can do a heck of a lot with CSS besides style. You can use CSS
positoning to position the element anywhere in the page, regardless of its
physical location in the HTML. You can also define event behaviors (in
terms of style) with it. For example, a hyperlink could be underlined
except when the mouse os over it. A button could have 2 different
background images, one for onmouseout, and one for onmouseover.
Sounds complicated
This way, I don't have to think too much about how it's going to look, and
our designer doesn't have to know how it works on the back end.
Encapsulation is a beautiful thing!

We can also mix and match these Server Controls in various pages and
applications, and the CSS makes it look the way it should in whatever
environment it's in.

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
Neither a follower nor a lender be.

"tshad" <ts**********@f tsolutions.com> wrote in message
news:eY******** ******@TK2MSFTN GP12.phx.gbl...
Many (if not most) have said that code-behind is best if working in
teams - which does seem logical.

How do you deal with the flow of the work?

I have someone who is good at designing, but know nothing about ASP. He
can build the design of the pages in HTML with tables, labels, textboxes
etc.

But then I would need to change them to ASP.net objects and write the
code to make the page work (normally I do this as I go - can't do this if
I work in a team environment).

Do you typically let the designer build the page first (aspx file) with
the html objects? Then later come along and change the ones you need to
asp objects and then build the code-behind page?

At this point, I assume you would work with both files and the designer
can't be working with the aspx page while you are working with the
code-behind. As you change html objects to asp objects you would need to
work with both files to add the references to the object in the code
behind page.

Also, how would the designer work with the design page while you are
making changes to the code-behind page as the page would probably fail
while you are making changes to the code-behind since the aspx file would
refer to it.

Just trying to understand the logistics to this.

Thanks,

Tom


Nov 19 '05 #5
> This seems the most logical (but maybe not) way to do it. Without the
design, how does the coder test it?
The coder creates a simplet interface in the skin with the controls defined.
These allow him to test his custom controls. He simply replaces the test
interface with the HTML the designer gives him and makes his changes.
I have also worked with a different system where we used controls that
were skinned.


What is that?


It's a system that loads up the look of the application (a skin). Basically
you dynamically load a control based on the path to another .ascx file. You
can search the web for examples of how to skin controls.

Again, wouldn't this be tough to test?
It's not hard to test because the coder will be working with test html in
the skin control.
This sounds similar to what I was talking about doing where the designer
just creates the page using standard HTML elements and then the coder
replaces the ones he wants with asp.net controls.

It is the same. I think for simplicity sake I would suggest working this
way. You just have to make sure the designer stays ahead of the coder in
order to keep you both busy.

HTH
--
Jeff Davis
..NET Application Developer
re************* ******@hotmail. com
---------------------------------------------------------------
Life is 90% what happens to you and 10% how you react.

"tshad" <ts**********@f tsolutions.com> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. .. Now I am confused.

I thought the main reason for code behind was to separate the design from
that and they could be worked on by different people at the same time.

But the styles here seems like one works on the page and then the other.

If that is the case, why could it not be done on the same page. You still
have the separation of code and design (code on top and design on the
bottom).

"Jeff Davis" <je************ @hotmail.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
I have worked in situations where the designer created the UI first and
then passed the html on to the coder. This works ok, but can cause the
coder to wait on the designer.


This seems the most logical (but maybe not) way to do it. Without the
design, how does the coder test it?

I have also worked with a different system where we used controls that
were skinned.


What is that?
This approach requires a solid roadmap for each UI via written
requirements, but it allows the coder to create the code behind and the
controls while the designer works on the html that will be placed in the
skin control.


Again, wouldn't this be tough to test?
The designer passes the html to the coder when it's complete and the
coder replaces the html control tags with the aspnet control tags in the
html when it gets put together. The custom control that loads up the skin
control simply uses the page.findcontro l("blah") function.


This sounds similar to what I was talking about doing where the designer
just creates the page using standard HTML elements and then the coder
replaces the ones he wants with asp.net controls.

Tom

I don't think one is better than the other, but this is how I've dealt
with these challenges in the past.

HTH

--
Jeff Davis
.NET Application Developer
re************* ******@hotmail. com
---------------------------------------------------------------
Life is 90% what happens to you and 10% how you react.
"tshad" <ts**********@f tsolutions.com> wrote in message
news:eY******** ******@TK2MSFTN GP12.phx.gbl...
Many (if not most) have said that code-behind is best if working in
teams - which does seem logical.

How do you deal with the flow of the work?

I have someone who is good at designing, but know nothing about ASP. He
can build the design of the pages in HTML with tables, labels, textboxes
etc.

But then I would need to change them to ASP.net objects and write the
code to make the page work (normally I do this as I go - can't do this
if I work in a team environment).

Do you typically let the designer build the page first (aspx file) with
the html objects? Then later come along and change the ones you need to
asp objects and then build the code-behind page?

At this point, I assume you would work with both files and the designer
can't be working with the aspx page while you are working with the
code-behind. As you change html objects to asp objects you would need
to work with both files to add the references to the object in the code
behind page.

Also, how would the designer work with the design page while you are
making changes to the code-behind page as the page would probably fail
while you are making changes to the code-behind since the aspx file
would refer to it.

Just trying to understand the logistics to this.

Thanks,

Tom



Nov 19 '05 #6
Hi Tom,
Do you have separate controls for each asp.net control?
I don't understand the question. Some of our Server Controls are Composite
Controls. Some are simply Controls that render their own HTML.
Sounds complicated
Using CSS? Not complicated for a good HTML designer. I couldn't do it, but
he can! From my point of view as a developer, it's not at all complicated.
It's easy, because I have less HTML to work with. It actually simplifies the
presentation layer quite a bit.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

"tshad" <ts**********@f tsolutions.com> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. .. "Kevin Spencer" <ke***@DIESPAMM ERSDIEtakempis. com> wrote in message
news:%2******** ********@TK2MSF TNGP14.phx.gbl. ..
Hi Tom,

Good question. The way we work it is, we use custom Server Controls for
our interface. Each Server Control renders a Div or a Table, with the
active elements inside. The Server Control also has a CSS class. The
Server Control itself contains HTML elements with no attributes or
styles. Only the parent container (div or table) has a CSS class.


Do you have separate controls for each asp.net control?

Our designer can then work on an external CSS style sheet to provide the
layout and style of the Server Control. The CSS class determines how each
HTML element IN the Server Control will be rendered on the client, as
each HTML element in the Server Control is a child of the parent div or
table. You can do a heck of a lot with CSS besides style. You can use CSS
positoning to position the element anywhere in the page, regardless of
its physical location in the HTML. You can also define event behaviors
(in terms of style) with it. For example, a hyperlink could be underlined
except when the mouse os over it. A button could have 2 different
background images, one for onmouseout, and one for onmouseover.

Sounds complicated
This way, I don't have to think too much about how it's going to look,
and our designer doesn't have to know how it works on the back end.
Encapsulation is a beautiful thing!

We can also mix and match these Server Controls in various pages and
applications, and the CSS makes it look the way it should in whatever
environment it's in.

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
Neither a follower nor a lender be.

"tshad" <ts**********@f tsolutions.com> wrote in message
news:eY******** ******@TK2MSFTN GP12.phx.gbl...
Many (if not most) have said that code-behind is best if working in
teams - which does seem logical.

How do you deal with the flow of the work?

I have someone who is good at designing, but know nothing about ASP. He
can build the design of the pages in HTML with tables, labels, textboxes
etc.

But then I would need to change them to ASP.net objects and write the
code to make the page work (normally I do this as I go - can't do this
if I work in a team environment).

Do you typically let the designer build the page first (aspx file) with
the html objects? Then later come along and change the ones you need to
asp objects and then build the code-behind page?

At this point, I assume you would work with both files and the designer
can't be working with the aspx page while you are working with the
code-behind. As you change html objects to asp objects you would need
to work with both files to add the references to the object in the code
behind page.

Also, how would the designer work with the design page while you are
making changes to the code-behind page as the page would probably fail
while you are making changes to the code-behind since the aspx file
would refer to it.

Just trying to understand the logistics to this.

Thanks,

Tom



Nov 19 '05 #7

"Kevin Spencer" <ke***@DIESPAMM ERSDIEtakempis. com> wrote in message
news:u8******** ******@tk2msftn gp13.phx.gbl...
Hi Tom,
Do you have separate controls for each asp.net control?
I don't understand the question. Some of our Server Controls are Composite
Controls. Some are simply Controls that render their own HTML.


Well, if you are going to use a asp:datagrid or asp:datalist, how would you
do that with a custom control? Or asp:textbox?

If you don't have the actual asp control, how would you test the code?

Tom
Sounds complicated


Using CSS? Not complicated for a good HTML designer. I couldn't do it, but
he can! From my point of view as a developer, it's not at all complicated.
It's easy, because I have less HTML to work with. It actually simplifies
the presentation layer quite a bit.

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
Neither a follower nor a lender be.

"tshad" <ts**********@f tsolutions.com> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
"Kevin Spencer" <ke***@DIESPAMM ERSDIEtakempis. com> wrote in message
news:%2******** ********@TK2MSF TNGP14.phx.gbl. ..
Hi Tom,

Good question. The way we work it is, we use custom Server Controls for
our interface. Each Server Control renders a Div or a Table, with the
active elements inside. The Server Control also has a CSS class. The
Server Control itself contains HTML elements with no attributes or
styles. Only the parent container (div or table) has a CSS class.


Do you have separate controls for each asp.net control?

Our designer can then work on an external CSS style sheet to provide the
layout and style of the Server Control. The CSS class determines how
each HTML element IN the Server Control will be rendered on the client,
as each HTML element in the Server Control is a child of the parent div
or table. You can do a heck of a lot with CSS besides style. You can use
CSS positoning to position the element anywhere in the page, regardless
of its physical location in the HTML. You can also define event
behaviors (in terms of style) with it. For example, a hyperlink could be
underlined except when the mouse os over it. A button could have 2
different background images, one for onmouseout, and one for
onmouseover.

Sounds complicated
This way, I don't have to think too much about how it's going to look,
and our designer doesn't have to know how it works on the back end.
Encapsulation is a beautiful thing!

We can also mix and match these Server Controls in various pages and
applications, and the CSS makes it look the way it should in whatever
environment it's in.

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
Neither a follower nor a lender be.

"tshad" <ts**********@f tsolutions.com> wrote in message
news:eY******** ******@TK2MSFTN GP12.phx.gbl...
Many (if not most) have said that code-behind is best if working in
teams - which does seem logical.

How do you deal with the flow of the work?

I have someone who is good at designing, but know nothing about ASP.
He can build the design of the pages in HTML with tables, labels,
textboxes etc.

But then I would need to change them to ASP.net objects and write the
code to make the page work (normally I do this as I go - can't do this
if I work in a team environment).

Do you typically let the designer build the page first (aspx file) with
the html objects? Then later come along and change the ones you need
to asp objects and then build the code-behind page?

At this point, I assume you would work with both files and the designer
can't be working with the aspx page while you are working with the
code-behind. As you change html objects to asp objects you would need
to work with both files to add the references to the object in the code
behind page.

Also, how would the designer work with the design page while you are
making changes to the code-behind page as the page would probably fail
while you are making changes to the code-behind since the aspx file
would refer to it.

Just trying to understand the logistics to this.

Thanks,

Tom



Nov 19 '05 #8
> Well, if you are going to use a asp:datagrid or asp:datalist, how would
you do that with a custom control? Or asp:textbox?
Composite Control.

I should mention that almost none of our Custom Controls render a single
HTML element. Usually, for example, with a form, the form fields are all
part of the same form, and therefore, are created as a single Control. In
cases like this, I often build the Control as a single unit, rendering its
own HTML, as this is more efficient on the server side than incorporating a
bunch of ASP.Net Controls that include a lot of code that will never be used
in the context of the Control we're building. Occasionally, we use ASP.Net
Controls in a Composite Control, but not often.

Microsoft was kind enough to create a number of individual HTML elements as
separate Controls, but they were also wise enough to allow and encourage the
developer to create his/her own. I believe that Microsoft intended for
developers (who have the necessary skill) to create their own. I find it
hard to believe that Microsoft intended these small Controls for use in
large-scale applications. Too much overhead. Creating a custom Server
Control is not difficult. The nicest thing about it is reusability.

I often think of programming in the same way as carpentry. Microsoft has
provided a nice set of raw components - 2X4s, bricks, nails, plywood, etc.
But if you had entire walls pre-built that you could use instead of building
them from scratch, wouldn't you? An ASP.Net Server Control is like a 2X4. A
wall is a bunch of 2X4s with nails and plywood all assembled as a unit. I
build walls, and then put them together. Later, if I need a wall of
dimensions that I've already created, I just use it. No need to "build it
from scratch" again. And if you design the walls with reusability in mind,
that is a frequent occurrence.
If you don't have the actual asp control, how would you test the code?
I don't understand the question. The only difference between the Controls I
create an Microsoft's is the prefix used in the template. You can even
create custom Designers so that you can see the Controls visually in the
VS.Net IDE.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

"tshad" <ts**********@f tsolutions.com> wrote in message
news:Or******** ******@TK2MSFTN GP14.phx.gbl...
"Kevin Spencer" <ke***@DIESPAMM ERSDIEtakempis. com> wrote in message
news:u8******** ******@tk2msftn gp13.phx.gbl...
Hi Tom,
Do you have separate controls for each asp.net control?


I don't understand the question. Some of our Server Controls are
Composite Controls. Some are simply Controls that render their own HTML.


Well, if you are going to use a asp:datagrid or asp:datalist, how would
you do that with a custom control? Or asp:textbox?

If you don't have the actual asp control, how would you test the code?

Tom
Sounds complicated


Using CSS? Not complicated for a good HTML designer. I couldn't do it,
but he can! From my point of view as a developer, it's not at all
complicated. It's easy, because I have less HTML to work with. It
actually simplifies the presentation layer quite a bit.

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
Neither a follower nor a lender be.

"tshad" <ts**********@f tsolutions.com> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
"Kevin Spencer" <ke***@DIESPAMM ERSDIEtakempis. com> wrote in message
news:%2******** ********@TK2MSF TNGP14.phx.gbl. ..
Hi Tom,

Good question. The way we work it is, we use custom Server Controls for
our interface. Each Server Control renders a Div or a Table, with the
active elements inside. The Server Control also has a CSS class. The
Server Control itself contains HTML elements with no attributes or
styles. Only the parent container (div or table) has a CSS class.

Do you have separate controls for each asp.net control?
Our designer can then work on an external CSS style sheet to provide
the layout and style of the Server Control. The CSS class determines
how each HTML element IN the Server Control will be rendered on the
client, as each HTML element in the Server Control is a child of the
parent div or table. You can do a heck of a lot with CSS besides style.
You can use CSS positoning to position the element anywhere in the
page, regardless of its physical location in the HTML. You can also
define event behaviors (in terms of style) with it. For example, a
hyperlink could be underlined except when the mouse os over it. A
button could have 2 different background images, one for onmouseout,
and one for onmouseover.

Sounds complicated

This way, I don't have to think too much about how it's going to look,
and our designer doesn't have to know how it works on the back end.
Encapsulation is a beautiful thing!

We can also mix and match these Server Controls in various pages and
applications, and the CSS makes it look the way it should in whatever
environment it's in.

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
Neither a follower nor a lender be.

"tshad" <ts**********@f tsolutions.com> wrote in message
news:eY******** ******@TK2MSFTN GP12.phx.gbl...
> Many (if not most) have said that code-behind is best if working in
> teams - which does seem logical.
>
> How do you deal with the flow of the work?
>
> I have someone who is good at designing, but know nothing about ASP.
> He can build the design of the pages in HTML with tables, labels,
> textboxes etc.
>
> But then I would need to change them to ASP.net objects and write the
> code to make the page work (normally I do this as I go - can't do this
> if I work in a team environment).
>
> Do you typically let the designer build the page first (aspx file)
> with the html objects? Then later come along and change the ones you
> need to asp objects and then build the code-behind page?
>
> At this point, I assume you would work with both files and the
> designer can't be working with the aspx page while you are working
> with the code-behind. As you change html objects to asp objects you
> would need to work with both files to add the references to the object
> in the code behind page.
>
> Also, how would the designer work with the design page while you are
> making changes to the code-behind page as the page would probably fail
> while you are making changes to the code-behind since the aspx file
> would refer to it.
>
> Just trying to understand the logistics to this.
>
> Thanks,
>
> Tom
>



Nov 19 '05 #9
Very interesting approach Kevin. I like this idea - something to try next
time. I have a question about your from server control. This control for
example renders all the textboxes and button neeedd for a form. Since you
are rendering the html directly and not making a composite control, i assume
implement all the postback handling features too? But doesnt doing it this
slow development at all since you have to spend perhaps mpre time on a
control instead of just dropping controls onto a page?

Ashok
"Kevin Spencer" <ke***@DIESPAMM ERSDIEtakempis. com> wrote in message
news:OF******** ******@tk2msftn gp13.phx.gbl...
Well, if you are going to use a asp:datagrid or asp:datalist, how would
you do that with a custom control? Or asp:textbox?
Composite Control.

I should mention that almost none of our Custom Controls render a single
HTML element. Usually, for example, with a form, the form fields are all
part of the same form, and therefore, are created as a single Control. In
cases like this, I often build the Control as a single unit, rendering its
own HTML, as this is more efficient on the server side than incorporating

a bunch of ASP.Net Controls that include a lot of code that will never be used in the context of the Control we're building. Occasionally, we use ASP.Net
Controls in a Composite Control, but not often.

Microsoft was kind enough to create a number of individual HTML elements as separate Controls, but they were also wise enough to allow and encourage the developer to create his/her own. I believe that Microsoft intended for
developers (who have the necessary skill) to create their own. I find it
hard to believe that Microsoft intended these small Controls for use in
large-scale applications. Too much overhead. Creating a custom Server
Control is not difficult. The nicest thing about it is reusability.

I often think of programming in the same way as carpentry. Microsoft has
provided a nice set of raw components - 2X4s, bricks, nails, plywood, etc.
But if you had entire walls pre-built that you could use instead of building them from scratch, wouldn't you? An ASP.Net Server Control is like a 2X4. A wall is a bunch of 2X4s with nails and plywood all assembled as a unit. I
build walls, and then put them together. Later, if I need a wall of
dimensions that I've already created, I just use it. No need to "build it
from scratch" again. And if you design the walls with reusability in mind,
that is a frequent occurrence.
If you don't have the actual asp control, how would you test the code?
I don't understand the question. The only difference between the Controls

I create an Microsoft's is the prefix used in the template. You can even
create custom Designers so that you can see the Controls visually in the
VS.Net IDE.

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
Neither a follower nor a lender be.

"tshad" <ts**********@f tsolutions.com> wrote in message
news:Or******** ******@TK2MSFTN GP14.phx.gbl...

"Kevin Spencer" <ke***@DIESPAMM ERSDIEtakempis. com> wrote in message
news:u8******** ******@tk2msftn gp13.phx.gbl...
Hi Tom,

Do you have separate controls for each asp.net control?

I don't understand the question. Some of our Server Controls are
Composite Controls. Some are simply Controls that render their own HTML.

Well, if you are going to use a asp:datagrid or asp:datalist, how would
you do that with a custom control? Or asp:textbox?

If you don't have the actual asp control, how would you test the code?

Tom

Sounds complicated

Using CSS? Not complicated for a good HTML designer. I couldn't do it,
but he can! From my point of view as a developer, it's not at all
complicated. It's easy, because I have less HTML to work with. It
actually simplifies the presentation layer quite a bit.

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
Neither a follower nor a lender be.

"tshad" <ts**********@f tsolutions.com> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
"Kevin Spencer" <ke***@DIESPAMM ERSDIEtakempis. com> wrote in message
news:%2******** ********@TK2MSF TNGP14.phx.gbl. ..
> Hi Tom,
>
> Good question. The way we work it is, we use custom Server Controls

for> our interface. Each Server Control renders a Div or a Table, with the> active elements inside. The Server Control also has a CSS class. The
> Server Control itself contains HTML elements with no attributes or
> styles. Only the parent container (div or table) has a CSS class.

Do you have separate controls for each asp.net control?

>
> Our designer can then work on an external CSS style sheet to provide
> the layout and style of the Server Control. The CSS class determines
> how each HTML element IN the Server Control will be rendered on the
> client, as each HTML element in the Server Control is a child of the
> parent div or table. You can do a heck of a lot with CSS besides style.> You can use CSS positoning to position the element anywhere in the
> page, regardless of its physical location in the HTML. You can also
> define event behaviors (in terms of style) with it. For example, a
> hyperlink could be underlined except when the mouse os over it. A
> button could have 2 different background images, one for onmouseout,
> and one for onmouseover.
>
Sounds complicated

> This way, I don't have to think too much about how it's going to look,> and our designer doesn't have to know how it works on the back end.
> Encapsulation is a beautiful thing!
>
> We can also mix and match these Server Controls in various pages and
> applications, and the CSS makes it look the way it should in whatever
> environment it's in.
>
> --
> HTH,
>
> Kevin Spencer
> Microsoft MVP
> .Net Developer
> Neither a follower nor a lender be.
>
> "tshad" <ts**********@f tsolutions.com> wrote in message
> news:eY******** ******@TK2MSFTN GP12.phx.gbl...
>> Many (if not most) have said that code-behind is best if working in
>> teams - which does seem logical.
>>
>> How do you deal with the flow of the work?
>>
>> I have someone who is good at designing, but know nothing about ASP.
>> He can build the design of the pages in HTML with tables, labels,
>> textboxes etc.
>>
>> But then I would need to change them to ASP.net objects and write the>> code to make the page work (normally I do this as I go - can't do this>> if I work in a team environment).
>>
>> Do you typically let the designer build the page first (aspx file)
>> with the html objects? Then later come along and change the ones you>> need to asp objects and then build the code-behind page?
>>
>> At this point, I assume you would work with both files and the
>> designer can't be working with the aspx page while you are working
>> with the code-behind. As you change html objects to asp objects you
>> would need to work with both files to add the references to the object>> in the code behind page.
>>
>> Also, how would the designer work with the design page while you are
>> making changes to the code-behind page as the page would probably fail>> while you are making changes to the code-behind since the aspx file
>> would refer to it.
>>
>> Just trying to understand the logistics to this.
>>
>> Thanks,
>>
>> Tom
>>
>
>




Nov 19 '05 #10

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

Similar topics

8
2596
by: Eric Veltman | last post by:
Hello everyone, I've posted this question before, but got no answer, so I'll try to reformulate the question, maybe it helps :-) By the way, this is not intended as the start of an ASP.NET flamewar. Before looking at PHP, I've used ASP.NET extensively for about a year and some things that I like a lot about it : - Design and code can be easily kept separate.
2
2038
by: Xenophobe | last post by:
I'm having a brain freeze on how to go about creating the logic for evenly distributing a group of items in rotation through multiple iterations. I'm particularly looking for logic flow help and not necessarily syntax examples. Let's say we have a database table with the following pieces of fruit: apple apple banana
0
965
by: Houston | last post by:
I am hosting a lake party based on the Survivor theme. Only its not really a party, we actually play games like volly ball, egg toss, ratf race etc. I have created an online signup form and so far I am able to keep track of team captains, and team players. Now I want the players to be able to Pay before the system actually ads them to the team. (Right now they just get added) The other trick is that I will no doubt have people that will...
0
915
by: Jacob Crossley | last post by:
Please tell me there is a way to prevent this annoyance ; - ) I'm into writing perfectly indented html, but the .net dev environment is being overzealous and messing up my html formatting. for example, I originally write: <table> <tr> <td>
1
2164
by: onyxring | last post by:
I've been building custom web controls in C# with VS2005. Currently I'm looking into adding design-time functionality and have reached a point where I need to generate code in the page the custom control is on. Enter the CodeDomSerializer class. I've found several examples creating Designer Serializers, nearly all of them for windows forms, but a few claiming to work for Web Controls; however, I have been singularly unsuccessful at...
1
1007
by: Dunc | last post by:
I'm pre-compiling and deploying my ASP.NET 2.0 project to a development server (I've checked "Allow pre-compiled site to be updateable") where a designer is modifying the aspx pages. Occasionally, his design requires a code change, and I need to download the ASPX files to update my project. While this worked peachy in ASP.NET 1.1, in 2.0 when it precompiles it appears to remove the <%@ Page CodeFile=... directive and changes the...
4
1230
by: Ronald S. Cook | last post by:
We're designing a Windows application. On a given form (let's say edit customer), there would be a list of all the (let's say cars) that the customer owns. We want the user to be able to click on a car (likely hyperlinked) and go to the car form and view/edit all those details. What's the best "flow" for this? Should we prompt the user that they've made changes to the customer form and they must save or cancel before going to the car...
3
2424
by: Pallav singh | last post by:
Hi All i am getting Error while writing following code for state design Pattern kindly let me know How to Correct this Error ?? Thanks Pallav Singh +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
0
10908
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10295
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
9426
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
7829
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
7018
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
5682
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
5867
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4064
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3136
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.